From 3be6367b9f14e33b10d19e9556fb018731a720e6 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Thu, 20 Mar 2003 18:58:02 +0000 Subject: This patch creates a function named pg_get_triggerdef that takes the oid of a trigger as its parameter. It is basically copied from the pg_dump code. Christopher Kings-Lynne --- doc/src/sgml/func.sgml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'doc/src') diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 256b0fa3fae..27966276d0e 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -1,5 +1,5 @@ @@ -6795,6 +6795,10 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); pg_get_indexdef + + pg_get_triggerdef + + pg_get_constraintdef @@ -6808,13 +6812,13 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); extract information from the system catalogs. pg_get_viewdef, pg_get_ruledef, - pg_get_indexdef, and + pg_get_indexdef(), + pg_get_triggerdef(), and pg_get_constraintdef respectively reconstruct the creating command for a view, rule, index, or constraint. (Note that this is a decompiled reconstruction, not - the verbatim text of the command.) At present - pg_get_constraintdef only works for - foreign-key constraints. pg_get_userbyid + the verbatim text of the command.) + pg_get_userbyid extracts a user's name given a user ID number. @@ -6846,6 +6850,11 @@ SELECT pg_type_is_visible('myschema.widget'::regtype); text get CREATE INDEX command for index + + pg_get_triggerdef(triggerOID) + text + Get CREATE [ CONSTRAINT ] TRIGGER command for trigger + pg_get_constraintdef(constraint_oid) text -- cgit v1.2.3