Re: constraint -- one or the other column not null

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Ivan Sergio Borgonovo <mail(at)webthatworks(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: constraint -- one or the other column not null
Date: 2006-09-06 09:12:40
Message-ID: 20060906091239.GA11415@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Sep 06, 2006 at 09:59:03AM +0200, Ivan Sergio Borgonovo wrote:
> You can write a xor function. At least in 7.4, that I'm currently using, there is no xor operator.

Ah, but there's is, but it's in disguise:

test=# select true <> true, true <> false, false <> true, false <> false;
?column? | ?column? | ?column? | ?column?
----------+----------+----------+----------
f | t | t | f
(1 row)

Hope this helps,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Mark Morgan Lloyd 2006-09-06 09:42:21 Re: NT4 client problem
Previous Message Alban Hertroys 2006-09-06 08:49:31 Re: Date using Int8