Re: BUG #18202: pg_constraint data isn't refreshed when using alter rename to on a constraint trigger - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18202: pg_constraint data isn't refreshed when using alter rename to on a constraint trigger
Date
Msg-id 564633.1700234243@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18202: pg_constraint data isn't refreshed when using alter rename to on a constraint trigger  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Logical replication is missing block of rows when sending initial sync?
Next
From: Daniel Gustafsson
Date:
Subject: Re: Memory leak on subquery as scalar operand