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

From Jim Jones
Subject Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
Date
Msg-id 3f90523d-270c-4296-98cf-7196d2ee456e@uni-muenster.de
Whole thread Raw
In response to Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement  (Philip Alger <paalger0@gmail.com>)
List pgsql-hackers
Hi Phil, Hi Jian

On 23/10/2025 00:27, Philip Alger wrote:
> It might be advantageous to show a `trigger name cannot be schema
> qualified` error to the user. Therefore, I added the check and the tests
> on v8 attached.
> 
> postgres=# SELECT pg_get_trigger_ddl('main_table', 'public.modified_a');
> ERROR:  trigger name cannot be schema qualified

I'm not sure this is the way to go here. Why specifically check for a
schema qualified trigger if it cannot be created in the first place? The
current error message for "trigger not found" would IMHO suffice, e.g.

ERROR:  trigger "s.tr" for table "t" does not exist

Jian, is that what you had in mind?

Best, Jim



pgsql-hackers by date:

Previous
From: Andrey Borodin
Date:
Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions
Next
From: Sergey Prokhorenko
Date:
Subject: Re: Add uuid_to_base32hex() and base32hex_to_uuid() built-in functions