disallowing multiple NULLs in a unique constraint - Mailing list pgsql-general

From David Garamond
Subject disallowing multiple NULLs in a unique constraint
Date
Msg-id 40271561.8080206@zara.6.isreserved.com
Whole thread Raw
Responses 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>)
List 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 by date:

Previous
From: "Marc G. Fournier"
Date:
Subject: Re: [pgsql-advocacy] Fwd: Favorite DB poll on ORA
Next
From: Tom Lane
Date:
Subject: Re: fsync = true beneficial on ext3?