Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement

From: Philip Alger <paalger0(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
Date: 2025-10-14 13:14:12
Message-ID: CAPXBC8+rawVt83GE2EiWgAt4TGv4p8Sxz4OX9NghnGHjngbrhw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message jian he 2025-10-14 13:26:56 pageinspect some function no need superuser priv
Previous Message Xuneng Zhou 2025-10-14 13:03:30 Re: Implement waiting for wal lsn replay: reloaded