Re: Weirdness with =?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Weirdness with =?
Дата
Msg-id 5128.1138633220@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Weirdness with =?  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список 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 по дате отправления:

Предыдущее
От: Jan Wieck
Дата:
Сообщение: Re: stats for failed transactions (was Re: [GENERAL] VACUUM
Следующее
От: Tom Lane
Дата:
Сообщение: Re: GRANT/REVOKE: Allow column-level privileges