Re: How to enforce uniqueness when NULL values are present?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Cc: Christian Schröder <cs(at)deriva(dot)de>
Subject: Re: How to enforce uniqueness when NULL values are present?
Date: 2007-03-10 20:47:36
Message-ID: 200703102147.36972.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Christian Schröder wrote:
> How can I enforce these constraints?

I submit that you should rethink your database schema and properly
normalize it. You are attempting to retool the algebra that underlies
the SQL functionalities into doing something they are not designed to
do, and you will, even if you manage to solve this particular problem,
be in a constant battle against the database system to get your
application to behave in a consistent manner.

A first step in that direction would be to rethink the apparently
troublesome use of null values.

--
Peter Eisentraut
http://developer.postgresql.org/~petere/

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Dan Sugalski 2007-03-10 21:14:05 Re: Moving from 32 to 64 bit builds on Solaris
Previous Message Kenneth Downs 2007-03-10 20:21:41 Re: HIPPA (was Re: Anyone know ...)