[BUGS] BUG #14626: array_agg( anyarray ) unexpected error with multi-valuedsingle-dimension array

Поиск
Список
Период
Сортировка
От david.g.johnston@gmail.com
Тема [BUGS] BUG #14626: array_agg( anyarray ) unexpected error with multi-valuedsingle-dimension array
Дата
Msg-id 20170419204327.24366.56745@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: [BUGS] BUG #14626: array_agg( anyarray ) unexpected error with multi-valued single-dimension array  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      14626
Logged by:          David Johnston
Email address:      david.g.johnston@gmail.com
PostgreSQL version: 9.5.6
Operating system:   Ubuntu 14.04
Description:

In short...

This works:

SELECT array_agg(CASE WHEN a = ARRAY[]::text[] THEN ARRAY['N/A']::text[]
ELSE a END)
FROM ( VALUES (1, ARRAY[]::text[]), (1, ARRAY['1']::text[]) ) vals (v, a);

This doesn't, and should since the number of elements in the non-empty array
shouldn't change the dimensionality logic.

SELECT array_agg(CASE WHEN a = ARRAY[]::text[] THEN ARRAY['N/A']::text[]
ELSE a END)
FROM ( VALUES (1, ARRAY[]::text[]), (1, ARRAY['1','2']::text[]) ) vals (v,
a)

David J.



--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

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

Предыдущее
От: Nico Williams
Дата:
Сообщение: [BUGS] pg_dump(1) failures when concurrently refreshing mat views
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [BUGS] BUG #14626: array_agg( anyarray ) unexpected error with multi-valued single-dimension array