7 ms·
I was sure most of this existed so I looked it up... Mostly centers around adding row_to_json() to the query. Using the example from the github repo: $ psq
by kbaker 7y ago
I was sure most of this existed so I looked it up... Mostly centers around adding row_to_json() to the query. Using the example from the github repo:
$ psql -P pager -nqtc "select row_to_json(pg_database) from pg_database where datname = 'template0'" | jq
{
"datname": "template0",
...
"datacl": [
"=c/postgres",
"postgres=CTc/postgres"
]
}