OSDN Git Service

Fix ALTER INDEX RENAME so that if the index belongs to a unique or primary key
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 Jan 2008 18:56:54 +0000 (18:56 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 17 Jan 2008 18:56:54 +0000 (18:56 +0000)
commit0df7717faa92ffc9d722495e2904767993b19d86
treea9d2111ef0890a9bdbc5c4612188c35efec6445a
parentd07de6c4ecdd5ba3340e94c99957fa899736c53b
Fix ALTER INDEX RENAME so that if the index belongs to a unique or primary key
constraint, the constraint is renamed as well.  This avoids inconsistent
situations that could confuse pg_dump (not to mention humans).  We might at
some point provide ALTER TABLE RENAME CONSTRAINT as a more general solution,
but there seems no reason not to allow doing it this way too.  Per bug #3854
and related discussions.
src/backend/catalog/pg_constraint.c
src/backend/commands/tablecmds.c
src/include/catalog/pg_constraint.h