Re: Unique indices and nulls
От | Roland Roberts |
---|---|
Тема | Re: Unique indices and nulls |
Дата | |
Msg-id | m265xc38ht.fsf@kuiper.rlent.pnet обсуждение исходный текст |
Ответ на | Re: Unique indices and nulls (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-novice |
>>>>> "Tom" == Tom Lane <tgl@sss.pgh.pa.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@rlenter.com 76-15 113th Street, Apt 3B roland@astrofoto.org Forest Hills, NY 11375
В списке pgsql-novice по дате отправления: