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: Jim Jones <jim.jones@uni-muenster.de>
Cc: Andrew Dunstan <andrew@dunslane.net>, Cary Huang <cary.huang@highgo.ca>, jian he <jian.universality@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-10-16T15:22:01Z
Lists: pgsql-hackers
Hi Jim,
Just to add to this:
> I don't think it's the expected behaviour. For instance,
> pg_get_viewdef() sees it differently (opposite approach):
>
> postgres=# SELECT pg_get_viewdef('"MyView"');
> pg_get_viewdef
> ---------------------------
> SELECT 42 AS "?column?";
> (1 row)
>
>
I saw from the docs that pg_get_viewdef('name') is deprecated and instead
users should use an OID:
https://www.postgresql.org/docs/18/functions-info.html#FUNCTIONS-INFO-CATALOG
--
Best, Phil Alger