> On 09/03/2023 17:05 CET Erik Wienhold <ewie@ewie.name> wrote:
>
> Use jsonb_populate_record with a custom type:
>
> create type myrec as (col real[][]);
>
> select * from jsonb_populate_record(null::myrec, '{"col":[[0,1],[2,3]]}');
>
> col
> ---------------
> {{0,1},{2,3}}
> (1 row)
I just noticed that it's also possible without a custom type:
select * from jsonb_to_record('{"col":[[0,1],[2,3]]}') as t(col real[]);
--
Erik