Created
February 3, 2017 19:49
-
-
Save kracekumar/3f4bcdd16d080b5a36436370823e0495 to your computer and use it in GitHub Desktop.
Postgres function `row_to_json` convert a particular row to JSON object.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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