Fix an ALTER TABLE test case so that it actually tests what the comment says it
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 Jun 2008 18:28:00 +0000 (18:28 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 Jun 2008 18:28:00 +0000 (18:28 +0000)
is testing.  Ah, the perils of making keywords optional ...

src/test/regress/expected/alter_table.out
src/test/regress/sql/alter_table.sql

index e3aebc630d8660eef2f5640d27bbbac47bc1a620..e7aef8bf59d5c53dbbfdd549ac2392cf9cc9704a 100644 (file)
@@ -351,7 +351,8 @@ alter table atacc3 inherit atacc2;
 ERROR:  child table is missing column "test2"
 -- fail due to mismatched data type
 alter table atacc3 add test2 bool;
-alter table atacc3 add inherit atacc2;
+alter table atacc3 inherit atacc2;
+ERROR:  child table "atacc3" has different type for column "test2"
 alter table atacc3 drop test2;
 -- succeed
 alter table atacc3 add test2 int;
index 46aacd1bef8bef8b461f4cbcd28987eb6dc729e5..60ce47c47df94fb8b7f89eda14d7d0e015e63bc8 100644 (file)
@@ -373,7 +373,7 @@ alter table atacc3 rename test2 to testx;
 alter table atacc3 inherit atacc2;
 -- fail due to mismatched data type
 alter table atacc3 add test2 bool;
-alter table atacc3 add inherit atacc2;
+alter table atacc3 inherit atacc2;
 alter table atacc3 drop test2;
 -- succeed
 alter table atacc3 add test2 int;