Re: proposal: row_to_array function

Поиск
Список
Период
Сортировка
От Jim Nasby
Тема Re: proposal: row_to_array function
Дата
Msg-id 54C6A724.1080507@BlueTreble.com
обсуждение исходный текст
Ответ на Re: proposal: row_to_array function  (Pavel Stehule <pavel.stehule@gmail.com>)
Ответы Re: proposal: row_to_array function  (Pavel Stehule <pavel.stehule@gmail.com>)
Список pgsql-hackers
On 1/25/15 4:23 AM, Pavel Stehule wrote:
>
> I tested a concept iteration over array in format [key1, value1, key2, value2, .. ] - what is nice, it works for
[[key1,value1],[key2,value2], ...] too
 
>
> It is only a few lines more to current code, and this change doesn't break a compatibility.
>
> Do you think, so this patch is acceptable?
>
> Ideas, comments?

Aside from fixing the comments... I think this needs more tests on corner cases. For example, what happens when you do

foreach a, b, c in array(array(1,2),array(3,4)) ?

Or the opposite case of

foreach a,b in array(array(1,2,3))

Also, what about:

foreach a,b in '{{{1,2},{3,4}},{{5,6},{7,8}}}'::int[] ?
-- 
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: pgaudit - an auditing extension for PostgreSQL
Следующее
От: Robert Haas
Дата:
Сообщение: Re: New CF app deployment