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-18 04:08:13
Message-ID: CAPXBC8+RQMRYfr=xYPWVp3DjGOLzTnsLVR=g8P7dePCN29Bu_A@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Jim,

One last thing: should we perhaps check for NULL before calling
> appendStringInfo here?
>
> /* pg_get_triggerdef_worker retrieves the trigger definition */
> res = pg_get_triggerdef_worker(trgOid, false);
>
> appendStringInfo(&buf, "%s;", res);
>

Yes, you're correct. I've added that in v6 attached.

--
Best,
Phil Alger

Attachment Content-Type Size
v6-0001-Add-pg_get_trigger_ddl-function.patch application/octet-stream 18.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Joel Jacobson 2025-10-18 05:43:15 Re: LISTEN/NOTIFY bug: VACUUM sets frozenxid past a xid in async queue
Previous Message Tender Wang 2025-10-18 03:12:12 Re: Use opresulttype instead of calling SearchSysCache1() in match_orclause_to_indexcol()