Re: Difference between "foo is false" and "foo=false"? Partial index on boolean.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bryce Nesbitt <bryce1(at)obviously(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Difference between "foo is false" and "foo=false"? Partial index on boolean.
Date: 2007-09-04 04:56:46
Message-ID: 14040.1188881806@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Bryce Nesbitt <bryce1(at)obviously(dot)com> writes:
> Could someone explain
> the difference between "foo=false" and "foo is false", for a boolean
> type column?

They give different results for NULL --- specifically, NULL for the
former and FALSE for the latter. Don't blame me, it's in the spec...

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bryce Nesbitt 2007-09-04 05:07:04 Re: Difference between "foo is false" and "foo=false"? Partial index on boolean.
Previous Message Bryce Nesbitt 2007-09-04 04:43:15 Difference between "foo is false" and "foo=false"? Partial index on boolean.