1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Add support for ALTER TABLE IF EXISTS ... RENAME CONSTRAINT

Also add regression test.  Previously this was documented to work, but
didn't.
This commit is contained in:
Bruce Momjian
2015-03-24 19:52:47 -04:00
parent feeb526cfe
commit 1d8198bb44
4 changed files with 22 additions and 1 deletions

View File

@ -228,6 +228,7 @@ ALTER TABLE constraint_rename_test RENAME CONSTRAINT con3 TO con3foo; -- ok
\d constraint_rename_test2
DROP TABLE constraint_rename_test2;
DROP TABLE constraint_rename_test;
ALTER TABLE IF EXISTS constraint_not_exist RENAME CONSTRAINT con3 TO con3foo; -- ok
ALTER TABLE IF EXISTS constraint_rename_test ADD CONSTRAINT con4 UNIQUE (a);
-- FOREIGN KEY CONSTRAINT adding TEST