Re: [GENERAL] NULL values seem to short-circuit my unique index

2008-11-08 Thread Alban Hertroys
On Sep 29, 2008, at 4:59 AM, Chris wrote: Matthew Wilson wrote: I'm trying to comprehend how NULL values interact with unique indexes. It seems like I can insert two rows with NULL values in a column with a unique constraint just fine. Is there something special about NULL? Can anyone post

Re: [GENERAL] NULL values seem to short-circuit my unique index

2008-09-29 Thread Tom Allison
You can always add a constraint that these columns cannot be NULL themselves. That removes this problem. On Sep 28, 2008, at 11:17 PM, Klint Gore <[EMAIL PROTECTED]> wrote: Matthew Wilson wrote: I'm trying to comprehend how NULL values interact with unique indexes. It seems like I can inser

Re: [GENERAL] NULL values seem to short-circuit my unique index

2008-09-28 Thread Klint Gore
Matthew Wilson wrote: I'm trying to comprehend how NULL values interact with unique indexes. It seems like I can insert two rows with NULL values in a column with a unique constraint just fine. Is there something special about NULL? Can anyone post some links to explain what is going on? h

Re: [GENERAL] NULL values seem to short-circuit my unique index

2008-09-28 Thread Tom Lane
Matthew Wilson <[EMAIL PROTECTED]> writes: > It seems like I can insert two rows with NULL values in a column with a > unique constraint just fine. This is per SQL spec and quite well-documented in our manual ... regards, tom lane -- Sent via pgsql-general mailing list (

Re: [GENERAL] NULL values seem to short-circuit my unique index

2008-09-28 Thread Chris
Matthew Wilson wrote: I'm trying to comprehend how NULL values interact with unique indexes. It seems like I can insert two rows with NULL values in a column with a unique constraint just fine. Is there something special about NULL? Can anyone post some links to explain what is going on? When

[GENERAL] NULL values seem to short-circuit my unique index

2008-09-28 Thread Matthew Wilson
I'm trying to comprehend how NULL values interact with unique indexes. It seems like I can insert two rows with NULL values in a column with a unique constraint just fine. Is there something special about NULL? Can anyone post some links to explain what is going on? Here's the example that stump