From: | Roland Roberts <roland(at)astrofoto(dot)org> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Unique indices and nulls |
Date: | 2002-09-11 14:29:18 |
Message-ID: | m265xc38ht.fsf@kuiper.rlent.pnet |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
Tom> Tell you the truth, my advice is to reconsider the way you're
Tom> using NULLs. C.J. Date thinks NULLs are evil and best
Tom> avoided ... your case may be an example of what he's driving
Tom> at.
I have reconsidered...the NULLs have to stay, but the index is no
longer unique, it is only on the non-null columns, and is only being
used for select purposes. Instead, I am enforcing the constraint via
a "before insert" trigger. Except for loading the table, this table
will have virtually no inserts, so the trigger seems a reasonable way
to go.
roland
--
PGP Key ID: 66 BC 3B CD
Roland B. Roberts, PhD RL Enterprises
roland(at)rlenter(dot)com 76-15 113th Street, Apt 3B
roland(at)astrofoto(dot)org Forest Hills, NY 11375
From | Date | Subject | |
---|---|---|---|
Next Message | David Lloyd | 2002-09-11 14:34:53 | Re: real beginner's questions |
Previous Message | Oliver Elphick | 2002-09-11 14:19:27 | Re: Strange situation with two tables. |