Joe <[EMAIL PROTECTED]> 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 extension of 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 the SQL standard, which
  does not allow zero-column tables. Zero-column tables are not in
  themselves very useful, but disallowing them creates odd special cases
  for ALTER TABLE DROP COLUMN, so it seems cleaner to ignore this spec
  restriction.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to