Re: [BUGS] UNIQUE constraint no longer works under 6.5.1

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [BUGS] UNIQUE constraint no longer works under 6.5.1
Дата
Msg-id 7425.934641991@sss.pgh.pa.us
обсуждение исходный текст
Ответ на UNIQUE constraint no longer works under 6.5.1  (Mark Dalphin <mdalphin@amgen.com>)
Список 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 по дате отправления:

Предыдущее
От: Mark Dalphin
Дата:
Сообщение: UNIQUE constraint no longer works under 6.5.1
Следующее
От: Thomas Lockhart
Дата:
Сообщение: Re: [BUGS] UNIQUE constraint no longer works under 6.5.1