disallowing multiple NULLs in a unique constraint

Поиск
Список
Период
Сортировка
От David Garamond
Тема disallowing multiple NULLs in a unique constraint
Дата
Msg-id 40271561.8080206@zara.6.isreserved.com
обсуждение исходный текст
Ответы Re: disallowing multiple NULLs in a unique constraint  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: disallowing multiple NULLs in a unique constraint  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-general
SQL Server only allow one NULL in a unique constraint column (it's the
unique index that does that, so the unique constraint behaves like that
too). The question is, what is the best way to simulate that behaviour
in Postgres? Can a CHECK constraint does that? Will a trigger with
SELECT count(*) ... WHERE f IS NULL be too slow if the table is large?

--
dave


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

Предыдущее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: [pgsql-advocacy] Fwd: Favorite DB poll on ORA
Следующее
От: Tom Lane
Дата:
Сообщение: Re: fsync = true beneficial on ext3?