Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id 32BDC9FB21B for ; Thu, 12 Oct 2006 07:39:31 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 02376-09 for ; Thu, 12 Oct 2006 10:39:20 +0000 (UTC) X-Greylist: delayed 00:59:59.072732 by SQLgrey- Received: from vms044pub.verizon.net (vms044pub.verizon.net [206.46.252.44]) by postgresql.org (Postfix) with ESMTP id 102089FA4C9 for ; Thu, 12 Oct 2006 07:39:20 -0300 (ADT) Received: from pampa ([71.101.13.108]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J7000FL6O5DQ5R1@vms044.mailsrvcs.net> for pgsql-sql@postgresql.org; Thu, 12 Oct 2006 04:39:15 -0500 (CDT) Date: Thu, 12 Oct 2006 05:39:47 -0400 From: Joe Subject: Re: Is this a bug? Deleting a column deletes the constraint. In-reply-to: <2323.1160630748@sss.pgh.pa.us> To: Tom Lane Cc: Bryce Nesbitt , pgsql-sql@postgresql.org Message-id: <1160645987.51367.13.camel@pampa> Organization: Freedom Circle, LLC MIME-version: 1.0 X-Mailer: Evolution 2.6.3 FreeBSD GNOME Team Port Content-type: text/plain Content-transfer-encoding: 7bit References: <452DCE97.2090706@obviously.com> <2323.1160630748@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/116 X-Sequence-Number: 26505 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"? Joe