Skip to content

Instantly share code, notes, and snippets.

@kracekumar
Created February 3, 2017 19:49
Embed
What would you like to do?
Postgres function `row_to_json` convert a particular row to JSON object.
test=# select row_to_json(author) from author;
{"id":1,"name":"Leo Tolstoy"}
{"id":2,"name":"Kafka"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment