Re: Is this a bug? Deleting a column deletes the constraint.
От | Tom Lane |
---|---|
Тема | Re: Is this a bug? Deleting a column deletes the constraint. |
Дата | |
Msg-id | 10299.1160663949@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: Is this a bug? Deleting a column deletes the constraint. (Joe <dev@freedomcircle.net>) |
Ответы |
Re: Is this a bug? Deleting a column deletes the constraint.
|
Список | pgsql-sql |
Joe <dev@freedomcircle.net> writes: > I didn't realize before that you can also drop all columns, leaving a > table without *any* columns. Is that a SQL92 "feature"? See the ALTER TABLE reference page: ALTER TABLE DROP COLUMN can be used to drop the only column of a table, leaving a zero-column table. This is an extensionof SQL, which disallows zero-column tables. The CREATE TABLE reference page further amplifies: PostgreSQL allows a table of no columns to be created (for example, CREATE TABLE foo();). This is an extension from theSQL standard, which does not allow zero-column tables. Zero-column tables are not in themselves very useful, but disallowingthem creates odd special cases for ALTER TABLE DROP COLUMN, so it seems cleaner to ignore this spec restriction. regards, tom lane
В списке pgsql-sql по дате отправления: