json_to_record Example

Поиск
Список
Период
Сортировка
От PG Doc comments form
Тема json_to_record Example
Дата
Msg-id 152571684246.9460.18059951267371255159@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: json_to_record Example  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-docs
The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/10/static/functions-json.html
Description:

Hi team,

I had the following issue when going through your
https://www.postgresql.org/docs/current/static/functions-json.html docs.

Looking at the json_to_record example it took me quite a while that it is
not possible to put the json_to_record function right after the the from
clause but instead I would need to put the tables name in front, then use
the json_to_record function. Then put the column definitions behind it and
in the SELECT clause I need to query the columns using the alias. As you use
a * in your examples, I assumed that json_to_record returns all values found
in the json argument of that function.

As an idea I would suggest to provide a sample json which contains key-value
pairs as well as arrays and use this for the whole examples as someone would
rather not query a json written by hand. 

Thank you very much and keep up the good work! I hope you understand and
like my suggestion!

Best regards,

Yoshi

В списке pgsql-docs по дате отправления:

Предыдущее
От: Ian Maddox
Дата:
Сообщение: Re: Request: Revive the security-specific section
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: authentication methods sections