Re: psql JSON output format

From: Christoph Berg <myon(at)debian(dot)org>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: psql JSON output format
Date: 2023-12-18 15:06:21
Message-ID: ZYBf7fD8vTb7DHZ2@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: To PostgreSQL Hackers
> On the command line, the format is selected by `psql --json` and `psql -J`.

Among other uses, it enables easy post-processing of psql output using `jq`:

$ psql -lJ | jq
[
{
"Name": "myon",
"Owner": "myon",
"Encoding": "UTF8",
"Locale Provider": "libc",
"Collate": "de_DE.utf8",
"Ctype": "de_DE.utf8",
"ICU Locale": null,
"ICU Rules": null,
"Access privileges": null
},
...
]

Christoph

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Matt Skelley 2023-12-18 15:26:40 Re: A wrong comment about search_indexed_tlist_for_var
Previous Message Christoph Berg 2023-12-18 14:56:28 psql JSON output format