From: Tom Lane <tgl@sss.pgh.pa.us>
To: eric.cyr@gmail.com
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18202: pg_constraint data isn't refreshed when using alter rename to on a constraint trigger
Date: Fri, 17 Nov 2023 10:17:23 -0500
Message-ID: <564633.1700234243@sss.pgh.pa.us> (raw)
In-Reply-To: <18202-0783b23955b5d2fd@postgresql.org>
References: <18202-0783b23955b5d2fd@postgresql.org>
PG Bug reporting form <noreply@postgresql.org> writes:
> When we rename a constraint trigger it seems like the name is not updated in
> pg_constraint.
Hmm, yeah ... renametrig() is intent on renaming the entry in pg_trigger,
but I see no code there that pays any attention to pg_constraint.
Conversely, ALTER TABLE RENAME CONSTRAINT updates the pg_constraint
entry but not the associated trigger. It's not real clear to me
whether this is intentional. There's no a-priori reason why the
two objects have to have the same name; but I doubt we have pg_dump
support for recreating a situation where they are different.
[ experiments ... ] Interestingly, pg_dump seems to dump the name
from pg_trigger not the one from pg_constraint.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, eric.cyr@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #18202: pg_constraint data isn't refreshed when using alter rename to on a constraint trigger
In-Reply-To: <564633.1700234243@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox