proposal: jsonb_populate_array - Mailing list pgsql-hackers

From Pavel Stehule
Subject proposal: jsonb_populate_array
Date
Msg-id CAFj8pRAPGu_ka4S-pxKKOJCta29KAaBMxGNGJkmiD5T=s+EBgA@mail.gmail.com
Whole thread Raw
Responses Re: proposal: jsonb_populate_array
List pgsql-hackers
Hi

Now, there is no native functionality for conversion from json(b) value to some array.


It should not be too hard to implement native function jsonb_populate_array

jsonb_populate_array(anyarray, jsonb) returns anyarray

Usage:

select jsonb_populate_array(null::text[], '["cust_full_name","cust_email"]')

Comments, notes?

Regards

Pavel


pgsql-hackers by date:

Previous
From: Masahiro Ikeda
Date:
Subject: Re: Support to define custom wait events for extensions
Next
From: Peter Geoghegan
Date:
Subject: Re: Naive handling of inequalities by nbtree initial positioning code