Re: Weirdness with =?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Cc: Hackers <pgsql-hackers@postgresql.org>
Date: 2006-01-30T15:00:20Z
Lists: pgsql-hackers
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> I tried replacing it with:
> UPDATE food_foods SET included=(verification_status = 'I');
> However, that set included to true only where verification_status=I, it 
> didn't set false at all.

You'd have gotten NULL, not FALSE, at the rows where verification_status
is NULL.

You could try coalesce, or "(verification_status = 'I') IS TRUE", to
get something that returns false instead of null.

			regards, tom lane