Re: BUG #3723: dropping an index that doesn't refer to table's columns

From: Sam Mason <sam(at)samason(dot)me(dot)uk>
To: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3723: dropping an index that doesn't refer to table's columns
Date: 2007-11-06 15:25:56
Message-ID: 20071106152556.GI1955@frubble.xen.chris-lamb.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, Nov 06, 2007 at 10:00:43AM -0500, Tom Lane wrote:
> Heikki Linnakangas <heikki(at)enterprisedb(dot)com> writes:
> > Not sure that's enough of a use case to justify not banning it...
>
> Yeah, it probably is.

It's reasonably easy to do this instead:

CREATE TABLE foo (
one INTEGER NOT NULL UNIQUE CHECK (one = 1)
);

The bug (for me) was that it's possible to get the database into an
inconsisant state, with no warning or obvious way to back out.

Sam

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Mason Hale 2007-11-06 15:51:26 BUG #3724: Duplicate values added to table despite unique index
Previous Message Tom Lane 2007-11-06 15:00:43 Re: BUG #3723: dropping an index that doesn't refer to table's columns