> On Mar 25, 2016, at 3:02 PM, Igor Neyman <ineyman@xxxxxxxxxxxxxx> wrote: > > James, > > Instead of pg_catalog, you could use INFORMATION_SCHEMA to get "WHEN" clause: > > select action_condition from information_schema.triggers where trigger_name = 'your_trigger_name'; > > Regards, > Igor Hah, good suggestion. Looking into how *it* is implemented (on 9.2 at least), brings us back to string manipulation of the result of pg_get_triggerdef(): \d+ information_schema.triggers ... "substring"(pg_get_triggerdef(t.oid), "position"("substring"(pg_get_triggerdef(t.oid), 48), 'EXECUTE PROCEDURE'::text) + 47)::information_schema.character_data AS action_statement, ... But at least we can turn a blind eye to its internal horror. Thanks! ------- James Robinson james@xxxxxxxxxxxxx -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general