| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au> |
| Cc: | Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Weirdness with =? |
| Date: | 2006-01-30 15:00:20 |
| Message-ID: | 5128.1138633220@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2006-01-30 15:02:32 | Re: GRANT/REVOKE: Allow column-level privileges |
| Previous Message | Jan Wieck | 2006-01-30 14:40:44 | Re: stats for failed transactions (was Re: [GENERAL] VACUUM |