Re: subselect removes rows

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: subselect removes rows
Дата
Msg-id 1217100.1638198095@sss.pgh.pa.us
обсуждение исходный текст
Ответ на subselect removes rows  ("Poot, Bas (B.J.)" <bas.poot@politie.nl>)
Ответы Re: subselect removes rows  ("Poot, Bas (B.J.)" <bas.poot@politie.nl>)
Список pgsql-bugs
"Poot, Bas (B.J.)" <bas.poot@politie.nl> writes:
> The bug is as follows:
> When using certain commands in a sub-select, it removes the row.
> This should never happen. It should return null instead. It worked in postgres 10, but somehow doesn't work anymore
onpostgres 13 (which we currently have) 

> Example query:

> select
> col1, col2, jsonb_each_text(col2)
> from (
> select 1 as col1, null::jsonb as col2
> union all
> select 1 as col1, '{"a":"2"}'::jsonb as col2
> ) t1

Your claim is quite unclear ... but AFAICS, that query produces exactly
the same results in v10 as in later versions.

regression=# select
col1, col2, jsonb_each_text(col2)
from (
select 1 as col1, null::jsonb as col2
union all
select 1 as col1, '{"a":"2"}'::jsonb as col2
) t1
;
 col1 |    col2    | jsonb_each_text
------+------------+-----------------
    1 | {"a": "2"} | (a,2)
(1 row)

            regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #17303: statement_timeout does not work always
Следующее
От: "Poot, Bas (B.J.)"
Дата:
Сообщение: Re: subselect removes rows