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 13dec588-3005-4cea-816e-f63e64de7ce2@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

On 28/10/2025 20:01, Philip Alger wrote:
>  I am not sure what you mean here. Are you suggesting keep the check in
> v7 with `trigger name \"%s\" for table \"%s\" does not exist"` and
> remove the extra check in v8?

No, having an error message here is correct. I was just thinking that
the error message could be the same one we get when providing a wrong
trigger name. For instance (from your tests):

ERROR:  trigger "no_such_trigger" for table "main_table" does not exist

This raises an error because no_such_trigger does not exist, so the same
error could be returned if the user specifies myschema.no_such_trigger
instead, making the extra check for a schema-qualified trigger name
unnecessary. I do realise this is rather a nitpick, and since the other
reviewers are fine with it, don't worry too much about it for now :)

Best, Jim



pgsql-hackers by date:

Previous
From: Manni Wood
Date:
Subject: [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement
Next
From: Amit Langote
Date:
Subject: Re: Batching in executor