Search Postgresql Archives

Re: Adding UNIQUE constraint on NULL column

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Smith <dave.smith@xxxxxxxxxxx> writes:

> I am trying to add a unique constraint on a column that can be null. The
> documentation states that null is treated as non equal values but I want
> them to be equal. Is there another way of doing this other than writing
> a before insert trigger?

UNIQUE constraints on NULLable columns work fine.  It's not clear from
the above what you're looking for.

Are you really saying that you want 'NULL = NULL' to return 't'?

-Doug

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
      message can get through to the mailing list cleanly

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux