Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement - Mailing list pgsql-hackers

From Philip Alger
Subject Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
Date
Msg-id CAPXBC8+rawVt83GE2EiWgAt4TGv4p8Sxz4OX9NghnGHjngbrhw@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement  (jian he <jian.universality@gmail.com>)
Responses Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
List pgsql-hackers


select  pg_get_trigger_ddl(-1, 'h');
ERROR:  relation with OID 4294967295 does not exist

this error obviously is not good.
we can follow the approach used by pg_get_viewdef(oid)

But isn't that an edge case? Would a user really pass in an arbitrary number like -1? That seems counterintuitive. 

--
Best, Phil Alger

pgsql-hackers by date:

Previous
From: Xuneng Zhou
Date:
Subject: Re: Implement waiting for wal lsn replay: reloaded
Next
From: jian he
Date:
Subject: pageinspect some function no need superuser priv