Re: Turn a json column into a table - Mailing list pgsql-sql

From Ion Alberdi
Subject Re: Turn a json column into a table
Date
Msg-id CANbgw4DwDkSxZ1rn10rdHS51fy3vGQqN73sEDvg9GRH3WPE=aw@mail.gmail.com
Whole thread Raw
In response to Turn a json column into a table  (Shaozhong SHI <shishaozhong@gmail.com>)
Responses Aw: Re: Turn a json column into a table  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
List pgsql-sql
Hi David,
it seems (json_to_record, jsonb_to_record) may help in this use case.
https://www.postgresql.org/docs/9.4/functions-json.html

Regards

Le mar. 15 févr. 2022 à 08:21, Shaozhong SHI <shishaozhong@gmail.com> a écrit :
There is a JSON column in a table.  It contains key value pairs, just like a dictionary.  

Keys are column names.  Values are values contained in a row.

It looks like that each JSON object needs to be expanded into row values in different columns.

What is the best way to turn this JSON column into a data table?

Regards,

David

pgsql-sql by date:

Previous
From: Shaozhong SHI
Date:
Subject: Turn a json column into a table
Next
From: Karsten Hilbert
Date:
Subject: Aw: Re: Turn a json column into a table