Re: Is this a bug? Deleting a column deletes the constraint.

From: Joe <dev(at)freedomcircle(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bryce Nesbitt <bryce1(at)obviously(dot)com>, pgsql-sql(at)postgresql(dot)org
Subject: Re: Is this a bug? Deleting a column deletes the constraint.
Date: 2006-10-12 09:39:47
Message-ID: 1160645987.51367.13.camel@pampa
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2006-10-12 14:39:09 Re: Is this a bug? Deleting a column deletes the constraint.
Previous Message Tom Lane 2006-10-12 05:25:48 Re: Is this a bug? Deleting a column deletes the constraint.