Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement - Mailing list pgsql-hackers

From Marcos Pegoraro
Subject Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
Date
Msg-id CAB-JLwb=3A=BZ02i7Vdijh9Nb0MwWZqUh2UgGMSTGoHNx4VErg@mail.gmail.com
Whole thread
In response to Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement  (Philip Alger <paalger0@gmail.com>)
Responses Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
List pgsql-hackers
Em sex., 17 de jul. de 2026 às 09:48, Philip Alger <paalger0@gmail.com> escreveu:
Updated the pg_get_trigger_ddl() patch to align with the other pg_get_*_ddl functions that are committed. I moved the function out of the relutils.c file to the ddlutils.c file and moved the tests to TAP tests as well. In this patch, pretty printing is introduced and functional, similar to the other DDL functions. 

Your function always returns the schema-qualified relation name, but this will make it incompatible with pg_get_table_ddl, because that function uses your code and might not return this way since the user could be cloning a table to a different schema.

Therefore, I believe that all _ddl functions that work with objects belonging to a schema should have an option to include schema-qualified or not.

regards
Marcos

pgsql-hackers by date:

Previous
From: "Hayato Kuroda (Fujitsu)"
Date:
Subject: RE: TDE: Benchmarking WAL encryption approaches
Next
From: Ayush Tiwari
Date:
Subject: Caching a partition index's parent OID in the relcache?