pgsql: Make ALTER TABLE revalidate uniqueness and exclusion constraints

From: Robert Haas <rhaas(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Make ALTER TABLE revalidate uniqueness and exclusion constraints
Date: 2011-01-21 03:53:07
Message-ID: E1Pg83f-0005uB-He@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Make ALTER TABLE revalidate uniqueness and exclusion constraints.

Failure to do so can lead to constraint violations. This was broken by
commit 1ddc2703a936d03953657f43345460b9242bbed1 on 2010-02-07, so
back-patch to 9.0.

Noah Misch. Regression test by me.

Branch
------
REL9_0_STABLE

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=39b5e5f3370258cae843e8cc83eccd59ddb532dd

Modified Files
--------------
src/backend/catalog/index.c | 43 ++++++++++++++++-------------
src/backend/commands/cluster.c | 9 +++++-
src/backend/commands/indexcmds.c | 4 +-
src/backend/commands/tablecmds.c | 7 +++--
src/include/catalog/index.h | 5 +++-
src/include/commands/cluster.h | 1 +
src/test/regress/expected/alter_table.out | 4 +++
src/test/regress/sql/alter_table.sql | 2 +
8 files changed, 48 insertions(+), 27 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Heikki Linnakangas 2011-01-21 13:05:34 pgsql: Don't require usage privileges on the foreign data wrapper when
Previous Message Peter Eisentraut 2011-01-20 20:35:03 pgsql: Fix wrong comment