proposal - enhancing plpgsql's FOREACH statement for support json type

Поиск
Список
Период
Сортировка
От Pavel Stehule
Тема proposal - enhancing plpgsql's FOREACH statement for support json type
Дата
Msg-id CAFj8pRAihABRPfb+L6dYtECQ9Z1xpz0g_U+Y_BbEnf78M5qeyA@mail.gmail.com
обсуждение исходный текст
Список pgsql-hackers
Hi

now we have lot of nice json related functions and I think so can be nice if plpgsql's statement FOREACH can directly support json type. It can save some CPY cycles by reducing some transformations.

My idea is following -

new syntax

FOREACH targetvar IN JSON ARRAY json array expr
LOOP
  ...

and

FOREACH targetvar, keyvar IN JSON OBJECT json record expr
LOOP
  ...


What do you think about this proposal? Comments, notes?

Regards

Pavel

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

Предыдущее
От: "王伟(学弈)"
Дата:
Сообщение: 回复:Re: PANIC: wrong buffer passed to visibilitymap_clear
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Make name optional in CREATE STATISTICS