Re: [SQL] Table Constraints with NULL values

2001-10-19 Thread Tom Lane
"David Allardyce" <[EMAIL PROTECTED]> writes: > ... If they had defined uniqueness as "all rows > must be distinct" then two all null rows would violate the uniqueness > constraint. Not the behavior I want at all. Er, why not? You're essentially arguing that the UNIQUE constraint should treat n

Re: [SQL] Table Constraints with NULL values

2001-10-19 Thread David Allardyce
I don't mean to re-hash an argument that has been debated-to-death before, but I can't help myself... > > However, shouldn't any values that are not NULL violate the constraint if > > the same values exist already? > > No. Postgres is conforming to the SQL standard in this. SQL92 saith > in sec

Re: [SQL] Table Constraints with NULL values

2001-10-19 Thread Tom Lane
"David Allardyce" <[EMAIL PROTECTED]> writes: > However, shouldn't any values that are not NULL violate the constraint if > the same values exist already? No. Postgres is conforming to the SQL standard in this. SQL92 saith in section 4.10: A unique constraint is satisfied if and only