[EMAIL PROTECTED] (Joe) writes: > On Thu, 2006-10-12 at 01:25 -0400, Tom Lane wrote: >> It does seem like this is wrong, in view of SQL92's statement about >> ALTER TABLE DROP COLUMN: >> >> 4) If RESTRICT is specified, then C shall not be referenced in >> the <query expression> of any view descriptor or in the <search >> condition> of any constraint descriptor other than a table con- >> straint descriptor that contains references to no other column >> and that is included in the table descriptor of T. >> >> IOW we should only allow unique constraints to be auto-dropped if >> they reference just the one single column. Ick. > > I didn't realize before that you can also drop all columns, leaving a > table without *any* columns. Is that a SQL92 "feature"?
You can create a table without any columns. tutorial=# create table empty_table (); CREATE TABLE tutorial=# \d empty_table Table "public.empty_table" Column | Type | Modifiers --------+------+----------- tutorial=# select * from empty_table ; -- (0 rows) A table without columns is of pretty limited usefulness, until you add some columns, but having a form of "zero" seems not insensible... -- let name="cbbrowne" and tld="acm.org" in String.concat "@" [name;tld];; http://www3.sympatico.ca/cbbrowne/lisp.html They are called computers simply because computation is the only significant job that has so far been given to them. -- Louis Ridenour ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly