From: | Erik Rijkers <er(at)xs4all(dot)nl> |
---|---|
To: | Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: proposal: jsonb_populate_array |
Date: | 2023-08-14 13:11:27 |
Message-ID: | 96c35ac8-ae82-b444-9b10-2dd1df96a950@xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Op 8/14/23 om 14:51 schreef Pavel Stehule:> po 14. 8. 2023 v 11:32
odesílatel Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
> with proposed function I can write
>
> select jsonb_populate_array(null:date[],
> '["2023-07-13","2023-07-14"]'::jsonb)
>
Not yet committed, but outstanding
SQL/JSON patches (v11) will let you do:
select json_query(
'["2023-07-13", "2023-07-14"]'::jsonb
, '$' returning date[]
);
json_query
-------------------------
{2023-07-13,2023-07-14}
(1 row)
That's (more or less) what you want, no?
Let's hope it gets submitted 17-ish, anyway
Erik
From | Date | Subject | |
---|---|---|---|
Next Message | Pavel Stehule | 2023-08-14 13:37:04 | Re: proposal: jsonb_populate_array |
Previous Message | Tomas Vondra | 2023-08-14 12:58:07 | Re: Wrong rows estimations with joins of CTEs slows queries by more than factor 500 |