Re: jsonb_array_elements_recursive()

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема Re: jsonb_array_elements_recursive()
Дата
Msg-id CAFj8pRAvEAD41G_M_a5mZRBNhFXAgNZ6XgnHPMLoHr=JhfCLwQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: jsonb_array_elements_recursive()  ("Joel Jacobson" <joel@compiler.org>)
Ответы Re: jsonb_array_elements_recursive()  ("Joel Jacobson" <joel@compiler.org>)
Список pgsql-hackers
Hi

ne 7. 2. 2021 v 16:59 odesílatel Joel Jacobson <joel@compiler.org> napsal:
Having thought about this some more,
the function name should of course be jsonb_unnest(),
similar to how unnest() works for normal arrays:

SELECT unnest(array[[3,2],[1,4]]);
unnest
--------
      3
      2
      1
      4
(4 rows)

SELECT jsonb_unnest('[[3,2],[1,4]]'::jsonb);
jsonb_unnest
--------------------
3
2
1
4
(4 rows)

Thoughts?

It  has  sense. Maybe it should return two columns - first path to value, and second with value. It can be used like some "reader"

Regards

Pavel


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

Предыдущее
От: "Joel Jacobson"
Дата:
Сообщение: Re: jsonb_array_elements_recursive()
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Prevent printing "next step instructions" in initdb and pg_upgrade