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: jian he <jian(dot)universality(at)gmail(dot)com>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Cary Huang <cary(dot)huang(at)highgo(dot)ca>, 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-29 01:31:12
Message-ID: 13dec588-3005-4cea-816e-f63e64de7ce2@uni-muenster.de
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Langote 2025-10-29 02:22:47 Re: Batching in executor
Previous Message Manni Wood 2025-10-29 01:23:50 [PATCH] Add pg_get_tablespace_ddl() function to reconstruct CREATE TABLESPACE statement