public inbox for [email protected]  
help / color / mirror / Atom feed
From: Christoph Berg <[email protected]>
To: PostgreSQL Hackers <[email protected]>
Subject: Re: psql JSON output format
Date: Mon, 18 Dec 2023 16:06:21 +0100
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>

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






view thread (2+ messages)

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected]
  Subject: Re: psql JSON output format
  In-Reply-To: <[email protected]>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox