Re: Array dimension lost if dimension length is zero

Поиск
Список
Период
Сортировка
От Andrew Gierth
Тема Re: Array dimension lost if dimension length is zero
Дата
Msg-id 874m5pzgy1.fsf@news-spur.riddles.org.uk
обсуждение исходный текст
Ответ на Re: Array dimension lost if dimension length is zero  (Shay Rojansky <roji@roji.org>)
Ответы Re: Array dimension lost if dimension length is zero
Список pgsql-bugs
>>>>> "Shay" == Shay Rojansky <roji@roji.org> writes:

 >> This is intentional: all empty arrays are alike, with zero
 >> dimensions (not one dimension, but none).

 Shay> Also, note that when reading an empty array in binary encoding,
 Shay> the dimension field contains one.

Nope:

postgres=# select array_send('{}'::integer[]);
         array_send
----------------------------
 \x000000000000000000000017

(that's ndim=00000000, flags=00000000, element_oid=00000017)

--
Andrew (irc:RhodiumToad)

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

Предыдущее
От: Shay Rojansky
Дата:
Сообщение: Re: Array dimension lost if dimension length is zero
Следующее
От: Xtra Coder
Дата:
Сообщение: Performance issue: jsonb_object_agg() is twice slower than to_jsonb()