pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Joe <dev@freedomcircle.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bryce Nesbitt <bryce1@obviously.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: Is this a bug? Deleting a column deletes the constraint.
Date: Thu, 12 Oct 2006 05:39:47 -0400
Message-ID: <1160645987.51367.13.camel@pampa> (raw)
In-Reply-To: <2323.1160630748@sss.pgh.pa.us>
References: <452DCE97.2090706@obviously.com>
	<2323.1160630748@sss.pgh.pa.us>

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"?

Joe




view thread (6+ messages)  latest in thread

Message-ID: <1160645987.51367.13.camel@pampa>
Permalink:  ../1160645987.51367.13.camel@pampa/
Also on:    postgresql.org/message-id/1160645987.51367.13.camel@pampa

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: dev@freedomcircle.net, tgl@sss.pgh.pa.us, bryce1@obviously.com
  Subject: Re: Is this a bug? Deleting a column deletes the constraint.
  In-Reply-To: <1160645987.51367.13.camel@pampa>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox