Re: Cleaning up array_in()

Поиск
Список
Период
Сортировка
От Alexander Lakhin
Тема Re: Cleaning up array_in()
Дата
Msg-id e6151e0a-e8d0-2104-63d1-106c195b960d@gmail.com
обсуждение исходный текст
Ответ на Re: Cleaning up array_in()  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Cleaning up array_in()  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
Hello Tom,

08.11.2023 02:52, Tom Lane wrote:
> Comments?

Thank you for the update! I haven't looked into the code, just did manual
testing and rechecked commands given in the arrays documentation ([1]).
Everything works correctly, except for one minor difference:
INSERT INTO sal_emp
     VALUES ('Bill',
     '{10000, 10000, 10000, 10000}',
     '{{"meeting", "lunch"}, {"meeting"}}');

currently gives:
ERROR:  malformed array literal: "{{"meeting", "lunch"}, {"meeting"}}"
LINE 4:     '{{"meeting", "lunch"}, {"meeting"}}');
             ^
DETAIL:  Multidimensional arrays must have sub-arrays with matching dimensions.

not
ERROR:  multidimensional arrays must have array expressions with matching dimensions

It seems that this inconsistency appeared with 475aedd1e, so it's not new
at all, but maybe fix it or describe the error more generally. (Though it
might be supposed that "for example" covers slight deviations.)

[1] https://www.postgresql.org/docs/devel/arrays.html

Best regards,
Alexander



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Remove MSVC scripts from the tree
Следующее
От: Justin Pryzby
Дата:
Сообщение: XX000: tuple concurrently deleted during DROP STATISTICS