pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: depesz@depesz.com
To: pgsql-general mailing list <pgsql-general@postgresql.org>
Subject: Re: How to get connection details from psql -> \e
Date: Mon, 13 Aug 2018 15:32:21 +0200
Message-ID: <1534167141.2390.35.camel@cybertec.at> (raw)
In-Reply-To: <20180813104415.hatiez4soz6jvozp@depesz.com>
References: <20180813104415.hatiez4soz6jvozp@depesz.com>

hubert depesz lubaczewski wrote:
> I'm trying to work on some extension to vim when invoked as \e from
> psql.
> 
> To make it fully work, I need to know connection details that psql was
> using while it invoked \e.
> 
> Is it possible to do in any way, or if not, any chance it could be added
> to wishlist for next versions of Pg?

Do you mean something like \set?

test=> \set
DBNAME = 'test'
ENCODING = 'UTF8'
HOST = '/var/run/postgresql'
PORT = '5432'
SERVER_VERSION_NAME = '10.5'
SERVER_VERSION_NUM = '100005'
VERSION_NAME = '10.5'
VERSION_NUM = '100005'
...

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com




view thread (5+ messages)  latest in thread

Message-ID: <1534167141.2390.35.camel@cybertec.at>
Permalink:  ../1534167141.2390.35.camel@cybertec.at/
Also on:    postgresql.org/message-id/1534167141.2390.35.camel@cybertec.at

 · 

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: laurenz.albe@cybertec.at, depesz@depesz.com
  Subject: Re: How to get connection details from psql -> \e
  In-Reply-To: <1534167141.2390.35.camel@cybertec.at>
  References: <20180813104415.hatiez4soz6jvozp@depesz.com> <1534167141.2390.35.camel@cybertec.at>

* 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