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

From: Philip Alger <paalger0(at)gmail(dot)com>
To: Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>
Cc: Jim Jones <jim(dot)jones(at)uni-muenster(dot)de>, 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 18:22:54
Message-ID: CAPXBC8+bVv6ykajwSMMmS8pm_=fy=eRx-g91A9zhsBPpoHf0Jw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Marcos,

wouldn't it be better to have an option to drop them first or create if not
> exists when available ?
>
> pg_get_trigger_ddl(oid, pretty, drop_first)
>

I’m not sure what you’re saying here. There is no pretty option for this
one, and the intent is for the user to be able to input a table and trigger
to get the CREATE TRIGGER statement. Not sure how drop_first fits in here;
we’re not dropping or creating triggers.

Best,
Phil Alger

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bryan Green 2025-10-18 18:26:40 [PATCH] Fix POSIX compliance in pgwin32_unsetenv()
Previous Message Shinya Kato 2025-10-18 17:04:18 Re: Fix lag columns in pg_stat_replication not advancing when replay LSN stalls