pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedConstraint Null Value
2+ messages / 2 participants
[nested] [flat]
* Constraint Null Value
@ 2006-06-30 14:41 Alex Soto <alex.soto@grifols.com>
2006-06-30 20:00 ` Re: Constraint Null Value Bruno Wolff III <bruno@wolff.to>
0 siblings, 1 reply; 2+ messages in thread
From: Alex Soto @ 2006-06-30 14:41 UTC (permalink / raw)
To: pgsql-admin
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?
Thank you very much.
La información contenida en el presente e-mail es confidencial y está reservada para el uso exclusivo de su destinatario. Se prohíbe estrictamente la distribución, copia o utilización de esta información sin el previo permiso de su destinatario. Si usted no fuera el destinatario, por favor notifíquelo inmediatamente al remitente y elimine el presente mensaje de su sistema informático.
Information contained in this e-mail is confidential and is intended for the use of the addressee only. Any dissemination, distribution, copying or use of this communication without prior permission of the addressee is strictly prohibited. If you are not the intended addressee, please notify the sender immediately by reply and then delete this message from your computer system.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Constraint Null Value
2006-06-30 14:41 Constraint Null Value Alex Soto <alex.soto@grifols.com>
@ 2006-06-30 20:00 ` Bruno Wolff III <bruno@wolff.to>
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Wolff III @ 2006-06-30 20:00 UTC (permalink / raw)
To: Alex Soto <alex.soto@grifols.com>; +Cc: pgsql-admin
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2006-06-30 20:00 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-06-30 14:41 Constraint Null Value Alex Soto <alex.soto@grifols.com>
2006-06-30 20:00 ` Bruno Wolff III <bruno@wolff.to>
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