Re: Turn a json column into a table

Поиск
Список
Период
Сортировка
От Ion Alberdi
Тема Re: Turn a json column into a table
Дата
Msg-id CANbgw4DwDkSxZ1rn10rdHS51fy3vGQqN73sEDvg9GRH3WPE=aw@mail.gmail.com
обсуждение исходный текст
Ответ на Turn a json column into a table  (Shaozhong SHI <shishaozhong@gmail.com>)
Ответы Aw: Re: Turn a json column into a table  (Karsten Hilbert <Karsten.Hilbert@gmx.net>)
Список 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 по дате отправления:

Предыдущее
От: Shaozhong SHI
Дата:
Сообщение: Turn a json column into a table
Следующее
От: Karsten Hilbert
Дата:
Сообщение: Aw: Re: Turn a json column into a table