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

Philip Alger <paalger0@gmail.com>

From: Philip Alger <paalger0@gmail.com>
To: jian he <jian.universality@gmail.com>
Cc: pgsql-hackers@postgresql.org
Date: 2025-10-14T13:14:12Z
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