From: Bruno Wolff III <bruno@wolff.to>
To: Alex Soto <alex.soto@grifols.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Constraint Null Value
Date: Fri, 30 Jun 2006 15:00:57 -0500
Message-ID: <20060630200057.GA25021@wolff.to> (raw)
In-Reply-To: <44A53835.5000202@grifols.com>
References: <44A53835.5000202@grifols.com>
On Fri, Jun 30, 2006 at 16:41:57 +0200,
Alex Soto <alex.soto@grifols.com> wrote:
> I am is Alex, and I m developing a product with PostgreSQL 8.1. I have a
> problem. This problem is that i have some unique constraints with
> multi-columns. The problem is that there is some that of the check
> constraint condition that can be null. As it is described in section
> 5.3.3, null of one row is different from the null of other row, so we
> can have two entries with same values inserted because of null value is
> not a considered equal in this comparison.
>
> Is there any administration syntax to change this behavior so null
> values are treated as same value?
No, but you can use partial indexes to impose that constraint. This came
up a couple of months ago on one of the lists and there was a bit more
discussion on the specifics if "use partial indexes" isn't enough of a
hint for you.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: bruno@wolff.to, alex.soto@grifols.com
Subject: Re: Constraint Null Value
In-Reply-To: <20060630200057.GA25021@wolff.to>
References: <44A53835.5000202@grifols.com> <20060630200057.GA25021@wolff.to>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox