Обсуждение: Extract Jsonb key and values

Поиск
Список
Период
Сортировка

Extract Jsonb key and values

От
"hari.prasath"
Дата:
Hi all,
    I am having jsonb as C character string received by WAL decoding and want to extract all its key and value pairs.
 
 
   Which is the best approach for extracting keys and its values?
   
    i)  Converting the C string to a PostgreSQL jsonb object
    ii) Using open-source json-c library




cheers
- Harry

Re: Extract Jsonb key and values

От
Robert Haas
Дата:
On Thu, Jun 23, 2016 at 8:52 AM, hari.prasath <hari.prasath@zohocorp.com> wrote:
> Hi all,
>     I am having jsonb as C character string received by WAL decoding and
> want to extract all its key and value pairs.
>
>
>    Which is the best approach for extracting keys and its values?
>
>     i)  Converting the C string to a PostgreSQL jsonb object
>     ii) Using open-source json-c library

I'm pretty sure there's some built-in function which can do this, but
this question is off-topic for this mailing list, which is about
feature development for PostgreSQL.  You probably want to ask
questions like this on pgsql-general.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company