sb_get_triggers (public)

 sb_get_triggers table_name

Defined in packages/schema-browser/tcl/schema-browser-procs-postgresql.tcl

Get all non-RI triggers on the table.

Parameters:
table_name

Partial Call Graph (max 5 caller/called nodes):
%3 sb_get_table_description sb_get_table_description (public) sb_get_triggers sb_get_triggers sb_get_table_description->sb_get_triggers db_foreach db_foreach (public) sb_get_triggers->db_foreach

Testcases:
No testcase defined.
Source code:
    set return_string "\n"
    db_foreach sb_get_triggers_select_1 {
        select
          tgname as trigger_name,
          trigger_type(tgtype) as trigger_type,
          case tgenabled when 't' then '' else '(disabled)' end as status,
          proname,
          tgfoid
        from
          pg_trigger t join (select oid from pg_class where relname = lower(:table_name)) c
            on (c.oid = t.tgrelid)
          join pg_proc p on (p.oid = t.tgfoid)
        where true
    } {
        append return_string "\nCREATE TRIGGER $trigger_name</a> $trigger_type EXECUTE PROCEDURE <a href=\"function-body?oid=$tgfoid\">$proname</a> $status"
    } if_no_rows {
        set return_string ""
    }
    return $return_string
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: