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

From: Philip Alger <paalger0(at)gmail(dot)com>
To: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>, jian he <jian(dot)universality(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
Date: 2025-10-16 15:22:01
Message-ID: CAPXBC8L0Mgw=sa49UJsJZVtMWsWmPQDPsheMxEJKUtnqeXEuAg@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message AIX PG user 2025-10-16 15:28:00 Re: AIX support
Previous Message Christoph Berg 2025-10-16 15:19:52 Re: failed NUMA pages inquiry status: Operation not permitted