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