pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ron <ronljohnsonjr@gmail.com>
To: pgsql-general@postgresql.org
Subject: psql \conninfo in tabular form?
Date: Tue, 7 Mar 2023 11:58:45 -0600
Message-ID: <4eed5377-3603-85b9-965e-f2bcd507c045@gmail.com> (raw)

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.





view thread (2+ messages)  latest in thread

Message-ID: <4eed5377-3603-85b9-965e-f2bcd507c045@gmail.com>
Permalink:  ../4eed5377-3603-85b9-965e-f2bcd507c045@gmail.com/
Also on:    postgresql.org/message-id/4eed5377-3603-85b9-965e-f2bcd507c045@gmail.com

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: ronljohnsonjr@gmail.com
  Subject: Re: psql \conninfo in tabular form?
  In-Reply-To: <4eed5377-3603-85b9-965e-f2bcd507c045@gmail.com>
  References: <4eed5377-3603-85b9-965e-f2bcd507c045@gmail.com>

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

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