Subject: Re: psql JSON output format

From: Christoph Berg <[email-masked]>
Date: Mon, 18 Dec 2023 16:06:21 +0100

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