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 (required)

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: