Re: Weirdness with =? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Weirdness with =?
Date
Msg-id 5128.1138633220@sss.pgh.pa.us
Whole thread Raw
In response to Weirdness with =?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
List 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


pgsql-hackers by date:

Previous
From: Jan Wieck
Date:
Subject: Re: stats for failed transactions (was Re: [GENERAL] VACUUM
Next
From: Tom Lane
Date:
Subject: Re: GRANT/REVOKE: Allow column-level privileges