Re: Adding UNIQUE constraint on NULL column

Поиск
Список
Период
Сортировка
От Dave Smith
Тема Re: Adding UNIQUE constraint on NULL column
Дата
Msg-id 1105629210.17154.15.camel@playpen.candata.com
обсуждение исходный текст
Ответ на Re: Adding UNIQUE constraint on NULL column  (Doug McNaught <doug@mcnaught.org>)
Ответы Re: Adding UNIQUE constraint on NULL column  (Doug McNaught <doug@mcnaught.org>)
Список pgsql-general
Yes
On Thu, 2005-01-13 at 10:12, Doug McNaught wrote:
> Dave Smith <dave.smith@candata.com> writes:
>
> > I am trying to add a unique constraint on a column that can be null. The
> > documentation states that null is treated as non equal values but I want
> > them to be equal. Is there another way of doing this other than writing
> > a before insert trigger?
>
> UNIQUE constraints on NULLable columns work fine.  It's not clear from
> the above what you're looking for.
>
> Are you really saying that you want 'NULL = NULL' to return 't'?
>
> -Doug
--
Dave Smith
CANdata Systems Ltd
416-493-9020


В списке pgsql-general по дате отправления:

Предыдущее
От: Doug McNaught
Дата:
Сообщение: Re: Adding UNIQUE constraint on NULL column
Следующее
От: bsimon@loxane.com
Дата:
Сообщение: Réf. : Re: Réf. : Debugging SPI Cfunctions