On Sat, Jan 23, 2021 at 07:46:01AM +0100, Pavel Stehule wrote:
> Hi
>
> jsonb with subscripting support can be used as a dictionary object in
> plpgsql.
>
> Can be nice to have support for iteration over a set of tuples (key,
> value).
>
> Some like
>
> FOREACH fieldvar [ KEY keyvar] IN DICTIONARY sourceexpr [VALUE searchexpr]
> LOOP
> END LOOP;
>
> and for JSON arrays
>
> FOREACH var IN ARRAY jsonval
> LOOP
> END LOOP
> [...]
>
> The goal is to support fast iteration over some non atomic objects
> different from arrays.
+1, it seems like something useful to have.