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

From: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>
To: Philip Alger <paalger0(at)gmail(dot)com>
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-17 23:44:52
Message-ID: 757f853a-bea3-451f-a59d-e4bb955847b1@uni-muenster.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 10/17/25 21:07, Philip Alger wrote:
> The rationale behind it is here: https://www.postgresql.org/message-
> id/945db7c5-be75-45bf-b55b-cb1e56f2e3e9%40dunslane.net <https://
> www.postgresql.org/message-id/945db7c5-be75-45bf-b55b-
> cb1e56f2e3e9%40dunslane.net>

Ah, I wasn’t aware of this thread. That settles it then :)

Documentation also LGTM.

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);

Best, Jim

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2025-10-17 23:51:22 Re: Minor spelling fix in memnodes.h
Previous Message Tom Lane 2025-10-17 23:07:36 Re: abi-compliance-check failure due to recent changes to pg_{clear,restore}_{attribute,relation}_stats()