Re: [BUGS] UNIQUE constraint no longer works under 6.5.1 - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] UNIQUE constraint no longer works under 6.5.1
Date
Msg-id 7425.934641991@sss.pgh.pa.us
Whole thread Raw
In response to UNIQUE constraint no longer works under 6.5.1  (Mark Dalphin <mdalphin@amgen.com>)
List pgsql-bugs
Mark Dalphin <mdalphin@amgen.com> writes:
> Using the UNIQUE constraint in a TABLE definition no longer does anything.

Interesting.  Playing with some variants of your example shows that
UNIQUE works fine *unless* there is another column marked PRIMARY KEY.
Then the UNIQUE constraint is ignored.  Looks like a simple logic bug in
the table-definition expander.

A look at the CVS logs reveals this apparently related entry for
parser/analyze.c:

revision 1.102
date: 1999/05/12 07:17:18;  author: thomas;  state: Exp;  lines: +68 -24
Fix problem with multiple indices defined if using column- and table-
 constraints. Reported by Tom Lane.
Now, check for duplicate indices and retain the one which is a primary-key.

Thomas, do you recall what that was all about?  I don't offhand...

            regards, tom lane

pgsql-bugs by date:

Previous
From: Mark Dalphin
Date:
Subject: UNIQUE constraint no longer works under 6.5.1
Next
From: Thomas Lockhart
Date:
Subject: Re: [BUGS] UNIQUE constraint no longer works under 6.5.1