psql \conninfo in tabular form?

From: Ron <ronljohnsonjr(at)gmail(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: psql \conninfo in tabular form?
Date: 2023-03-07 17:58:45
Message-ID: 4eed5377-3603-85b9-965e-f2bcd507c045@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

v13.10

Instead of a sentence like this:
You are connected to database "postgres" as user "postgres" via socket in
"/var/run/postgresql" at port "5433".

I'd rather have something tabular like:
   keyword  |   value
------------+-----------------------
  database  | postgres
  user      | postgres
  host      | /var/run/postgresql
  port      |  5433

Running psql with the -E option didn't help.  There's a github project named
ibarwick/conninfo which looked useful, but it seems to only parse connection
strings.

--
Born in Arizona, moved to Babylonia.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Erik Wienhold 2023-03-07 19:07:25 Re: psql \conninfo in tabular form?
Previous Message Peter J. Holzer 2023-03-07 12:53:03 Re: escape vs. bytea in config