Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 2E0B39FB2F8 for ; Thu, 12 Oct 2006 12:04:13 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 55370-04-2 for ; Thu, 12 Oct 2006 12:04:05 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from floppy.pyrenet.fr (news.pyrenet.fr [194.116.145.2]) by postgresql.org (Postfix) with ESMTP id 28E5F9FA4C5 for ; Thu, 12 Oct 2006 12:04:05 -0300 (ADT) Received: by floppy.pyrenet.fr (Postfix, from userid 106) id B13E430AF3; Thu, 12 Oct 2006 17:04:03 +0200 (MET DST) From: Chris Browne X-Newsgroups: pgsql.sql Subject: Re: Is this a bug? Deleting a column deletes the constraint. Date: Thu, 12 Oct 2006 10:56:14 -0400 Organization: cbbrowne Computing Inc Lines: 38 Message-ID: <60iripr3ap.fsf@dba2.int.libertyrms.com> References: <452DCE97.2090706@obviously.com> <2323.1160630748@sss.pgh.pa.us> <1160645987.51367.13.camel@pampa> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@news.hub.org User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.19 (linux) Cancel-Lock: sha1:596WzOjs8r5TDLhgrZzlVUuadmI= To: pgsql-sql@postgresql.org X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.453 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200610/118 X-Sequence-Number: 26507 dev@freedomcircle.net (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 of any view descriptor or in the > 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