unique constraint with a null column?

Поиск
Список
Период
Сортировка
От CSN
Тема unique constraint with a null column?
Дата
Msg-id 20051230213040.32618.qmail@web52906.mail.yahoo.com
обсуждение исходный текст
Ответы Re: unique constraint with a null column?  (Bruno Wolff III <bruno@wolff.to>)
Re: unique constraint with a null column?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I have three columns, and one of them can be null. I'd
like to create a unique constraint across all three
columns and allow only one null value. e.g.

a|b|c
abc|123|null
abc|123|null # not allowed
abc|456|null
abc|456|987
abc|456|876
def|456|null
def|456|null # not allowed

Currently, the 'not allowed' lines are allowed.

thanks
csn





__________________________________
Yahoo! for Good - Make a difference this year.
http://brand.yahoo.com/cybergivingweek2005/

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

Предыдущее
От: Robert Treat
Дата:
Сообщение: Re: Forum Software
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: unique constraint with a null column?