AW: XML column causes record to be both NULL and NOT NULL

Поиск
Список
Период
Сортировка
От Wilm Hoyer
Тема AW: XML column causes record to be both NULL and NOT NULL
Дата
Msg-id 462567f501af4621964bccacaf824590@dental-vision.de
обсуждение исходный текст
Ответ на Re: XML column causes record to be both NULL and NOT NULL  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
> Well, it is strange, but it's acting per SQL spec.
> As stated at [1]:

>>    If the expression is row-valued, then IS NULL is true when the row
>>    expression itself is null or when all the row's fields are null, while
>>    IS NOT NULL is true when the row expression itself is non-null and all
>>   the row's fields are non-null. Because of this behavior, IS NULL and
>>    IS NOT NULL do not always return inverse results for row-valued
>>    expressions; in particular, a row-valued expression that contains both
>>   null and non-null fields will return false for both tests.

> The fact that the added column is of XML type isn't relevant here; what's relevant is that it has a null value.

>            regards, tom lane

> [1] https://www.postgresql.org/docs/current/functions-comparison.html

Thanks for the Explanation. The solution is clear then - just test part of the record or "flatten" the record with a
castto text. 

Best regards,
Wilm.



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: BUG #18009: Postgres Recovery not happening
Следующее
От: PG Bug reporting form
Дата:
Сообщение: BUG #18015: missing dependency packages for postgis extension