diff options
| author | Tom Lane | 2004-03-23 19:35:17 +0000 |
|---|---|---|
| committer | Tom Lane | 2004-03-23 19:35:17 +0000 |
| commit | 24614a988005a0811198458fc934b87375582168 (patch) | |
| tree | 42510feed47a8aee1d95196de379b1be5826c296 /src/test | |
| parent | 446b5476e531cb92778073903341ff5ec8d3044b (diff) | |
Upgrade ALTER TABLE DROP COLUMN so that it can drop an OID column, and
remove separate implementation of ALTER TABLE SET WITHOUT OIDS in favor
of doing a regular DROP. Also, cause CREATE TABLE to account completely
correctly for the inheritance status of the OID column. This fixes
problems with dropping OID columns that have dependencies, as noted by
Christopher Kings-Lynne, as well as making sure that you can't drop an
OID column that was inherited from a parent.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/regress/expected/alter_table.out | 6 | ||||
| -rw-r--r-- | src/test/regress/sql/alter_table.sql | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/src/test/regress/expected/alter_table.out b/src/test/regress/expected/alter_table.out index 0396351f1ff..089651c7278 100644 --- a/src/test/regress/expected/alter_table.out +++ b/src/test/regress/expected/alter_table.out @@ -688,9 +688,11 @@ delete from atacc1; -- try dropping a non-existent column, should fail alter table atacc1 drop bar; ERROR: column "bar" of relation "atacc1" does not exist --- try dropping the oid column, should fail +-- try dropping the oid column, should succeed alter table atacc1 drop oid; -ERROR: cannot drop system column "oid" +-- try dropping the xmin column, should fail +alter table atacc1 drop xmin; +ERROR: cannot drop system column "xmin" -- try creating a view and altering that, should fail create view myview as select * from atacc1; select * from myview; diff --git a/src/test/regress/sql/alter_table.sql b/src/test/regress/sql/alter_table.sql index 749af267107..dcd968a0b65 100644 --- a/src/test/regress/sql/alter_table.sql +++ b/src/test/regress/sql/alter_table.sql @@ -632,9 +632,12 @@ delete from atacc1; -- try dropping a non-existent column, should fail alter table atacc1 drop bar; --- try dropping the oid column, should fail +-- try dropping the oid column, should succeed alter table atacc1 drop oid; +-- try dropping the xmin column, should fail +alter table atacc1 drop xmin; + -- try creating a view and altering that, should fail create view myview as select * from atacc1; select * from myview; |
