Hi
ne 7. 2. 2021 v 16:59 odesílatel Joel Jacobson <joel(at)compiler(dot)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