BUG #17340: Unnest discards rows with empty or null arrays

Поиск
Список
Период
Сортировка
От PG Bug reporting form
Тема BUG #17340: Unnest discards rows with empty or null arrays
Дата
Msg-id 17340-74d17bbe94cb4190@postgresql.org
обсуждение исходный текст
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      17340
Logged by:          Magnus Falch
Email address:      magnus.falch@gmail.com
PostgreSQL version: 14.1
Operating system:   Ubuntu 20.04
Description:

No part of the documentation covers this behaviour and it feels incorrect.

A function called in the select part of a query discarding other data does
not make sense and feels like it breaks with expectations without being
documented.

select name,unnest(test_values.int_array) as array_item from
(select 'test_a' as name,null :: int[] as int_array union all
select 'test_b' as name ,array[1,2,3] as int_array ) test_values

Actual result set:
name |    array_item
test_b |    1
test_b |    2
test_b |    3 


Expected result set:
name |    array_item
test_a |    null
test_b |    1
test_b |    2
test_b |    3


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

Предыдущее
От: Yura Sokolov
Дата:
Сообщение: Re: BUG #17335: Duplicate result rows in Gather node when "Suppress Append ... that have a single child" applied
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: BUG #17339: Assert failed on attempt to detach a sequence concurrently