Re: exclusive OR possible within a where clause?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Salisbury <salisbury(at)globe(dot)gov>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: exclusive OR possible within a where clause?
Date: 2011-10-13 23:49:59
Message-ID: 9898.1318549799@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

David Salisbury <salisbury(at)globe(dot)gov> writes:
> Short version, is there a way to implement an exclusive OR in a where clause?

The boolean <> operator will do the trick.

(x = y) <> (a = b)

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message René Fournier 2011-10-14 00:25:50 Re: PostGIS: Approximating a house number from street address range
Previous Message Steve Crawford 2011-10-13 23:49:26 Re: Error: timestamp with timezone + interval is not immutable while creating index