Search Postgresql Archives

Re: How to create unique constraint on NULL columns

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

 



> I was faced with a similar issue.  One suggestion I got from the Internet 
> was to create a shadow column that contains the values used in the Index, 
> with a dummy entry (in my case, the string <NULL>) for those records in 
> which the primary column is NULL.  It works well for my app.

Michael,

thank you.
This is not working in my case. Uniquenes sis not sufficient: I need 
referential integrity with uniqueness. If I add <NULL> department, this must 
be added into department table also and pollutes this table.

Andrus. 



---------------------------(end of broadcast)---------------------------
TIP 1: 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