From: | Zhihong Yu <zyu(at)yugabyte(dot)com> |
---|---|
To: | Joel Jacobson <joel(at)compiler(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: jsonb_array_elements_recursive() |
Date: | 2021-02-07 17:33:29 |
Message-ID: | CALNJ-vQ-eZLC9-SYd1MnHoTp=_pRgn2TXkQJMA1oV0A9h6tQWw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
# SELECT '[[5,2],"a",[8,[3,2],6]]'::jsonb;
jsonb
-------------------------------
[[5, 2], "a", [8, [3, 2], 6]]
(1 row)
unnest(array[[3,2],"a",[1,4]]) is not accepted currently.
Would the enhanced unnest accept the above array ?
Cheers
On Sun, Feb 7, 2021 at 8:31 AM Joel Jacobson <joel(at)compiler(dot)org> wrote:
> On Sun, Feb 7, 2021, at 17:27, Tom Lane wrote:
> >"Joel Jacobson" <joel(at)compiler(dot)org> writes:
> >> Having thought about this some more,
> >> the function name should of course be jsonb_unnest(),
> >> similar to how unnest() works for normal arrays:
> >
> >Why not just unnest(), then?
> >
> >regards, tom lane
>
> Ahh, of course! I totally forgot about function overloading when thinking
> about this.
>
> +1
>
> /Joel
>
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2021-02-07 17:35:51 | Re: jsonb_array_elements_recursive() |
Previous Message | Joel Jacobson | 2021-02-07 16:31:13 | Re: jsonb_array_elements_recursive() |