Make ALTER TABLE revalidate uniqueness and exclusion constraints.
Robert Haas <rhaas@postgresql.org>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/catalog/index.c | modified | +24 −19 |
| src/backend/commands/cluster.c | modified | +7 −2 |
| src/backend/commands/indexcmds.c | modified | +2 −2 |
| src/backend/commands/tablecmds.c | modified | +4 −3 |
| src/include/catalog/index.h | modified | +4 −1 |
| src/include/commands/cluster.h | modified | +1 −0 |
| src/test/regress/expected/alter_table.out | modified | +4 −0 |
| src/test/regress/sql/alter_table.sql | modified | +2 −0 |