Thread: pgsql: Fix ALTER INDEX RENAME so that if the index belongs to a unique

pgsql: Fix ALTER INDEX RENAME so that if the index belongs to a unique

From
tgl@postgresql.org (Tom Lane)
Date:
Log Message:
-----------
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.

Modified Files:
--------------
    pgsql/src/backend/catalog:
        pg_constraint.c (r1.37 -> r1.38)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/catalog/pg_constraint.c?r1=1.37&r2=1.38)
    pgsql/src/backend/commands:
        tablecmds.c (r1.239 -> r1.240)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/backend/commands/tablecmds.c?r1=1.239&r2=1.240)
    pgsql/src/include/catalog:
        pg_constraint.h (r1.26 -> r1.27)
        (http://developer.postgresql.org/cvsweb.cgi/pgsql/src/include/catalog/pg_constraint.h?r1=1.26&r2=1.27)