Re: [SQL] unique index on fields with possible null values

2007-07-26 Thread Tom Lane
Dmitry Ruban <[EMAIL PROTECTED]> writes: > I'm trying to find a solution for unique index on fields with possible > null values. You appear to be hoping that a unique index would constrain a column to contain at most one null entry. It doesn't work like that, and I strongly urge you to reconsider

[SQL] unique index on fields with possible null values

2007-07-26 Thread Dmitry Ruban
Hello pgsql-sql, I'm trying to find a solution for unique index on fields with possible null values. Example table: CREATE TABLE test ( a integer NOT NULL, b integer NULL ); As long as unique index can't check if there are records with null values i found the only one solution for this proble