Re: pgsql 8.4 "not" + "is contained by" operators return wrong result

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgsql 8.4 "not" + "is contained by" operators return wrong result
Дата
Msg-id 21403.1374772524@sss.pgh.pa.us
обсуждение исходный текст
Ответ на pgsql 8.4 "not" + "is contained by" operators return wrong result  (László Lajos Jánszky <laszlo.janszky@gmail.com>)
Список pgsql-bugs
László Lajos Jánszky <laszlo.janszky@gmail.com> writes:
> The following query returns nothing, but it should return 1.
> *SELECT 1 FROM NOT(ARRAY[1] <@ NULL**);  *

I assume you meant SELECT 1 WHERE NOT(ARRAY[1] <@ NULL) ?
Because what you wrote doesn't parse.

This is not a bug.  "ARRAY[1] <@ NULL" yields NULL.  NOT (NULL) is still
NULL.  WHERE treats a NULL result as FALSE.

It might help you to consider that NULL means "iso-8859-1".  It does not
mean "empty array".
        regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: László Lajos Jánszky
Дата:
Сообщение: pgsql 8.4 "not" + "is contained by" operators return wrong result
Следующее
От: Petr Chmelar
Дата:
Сообщение: Re: BUG #8329: UPDATE x SET x.y = x.y + z does not work in PL/pgSQL