Re: jsonb_array_elements_recursive()
| От | Joel Jacobson |
|---|---|
| Тема | Re: jsonb_array_elements_recursive() |
| Дата | |
| Msg-id | 0fca97b0-5c52-43d5-a6d5-bec35070036c@www.fastmail.com обсуждение исходный текст |
| Ответ на | Re: jsonb_array_elements_recursive() (Pavel Stehule <pavel.stehule@gmail.com>) |
| Список | pgsql-hackers |
On Sun, Feb 7, 2021, at 17:08, Pavel Stehule wrote:
>>ne 7. 2. 2021 v 16:59 odesílatel Joel Jacobson <joel@compiler.org> napsal:
>>
>>SELECT jsonb_unnest('[[3,2],[1,4]]'::jsonb);
>>jsonb_unnest
>>--------------------
>>3
>>2
>>1
>>4
>>(4 rows)
>
>It has sense. Maybe it should return two columns - first path to value, and second with value. It can be used like some >"reader"
Thanks for thinking about this.
I would expect jsonb_unnest() to have the same semantics as unnest(), but returning SETOF jsonb.
jsonb_unnest() implemented in C would of course be much more performant than the PL/pgSQL PoC.
And I think performance could be important for such a function,
so I think we should be careful adding extra complexity to such a function,
unless it can be demonstrated it is needed for a majority of cases.
/Joel
В списке pgsql-hackers по дате отправления: