Re: [BUGS] UNIQUE constraint no longer works under 6.5.1
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Lockhart <lockhart@alumni.caltech.edu>
Cc: Mark Dalphin <mdalphin@amgen.com>, pgsql-bugs@postgreSQL.org, pgsql-hackers@postgreSQL.org
Date: 1999-08-14T14:46:31Z
Lists: pgsql-bugs, pgsql-hackers
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