json_to_record Example - Mailing list pgsql-docs

From PG Doc comments form
Subject json_to_record Example
Date
Msg-id 152571684246.9460.18059951267371255159@wrigleys.postgresql.org
Whole thread Raw
Responses Re: json_to_record Example  (Bruce Momjian <bruce@momjian.us>)
List 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 by date:

Previous
From: Ian Maddox
Date:
Subject: Re: Request: Revive the security-specific section
Next
From: Michael Paquier
Date:
Subject: Re: authentication methods sections