From: Tom Lane <tgl@sss.pgh.pa.us>
To: depesz@depesz.com
Cc: pgsql-general mailing list <pgsql-general@postgresql.org>
Subject: Re: How to get connection details from psql -> \e
Date: Mon, 13 Aug 2018 10:00:56 -0400
Message-ID: <17126.1534168856@sss.pgh.pa.us> (raw)
In-Reply-To: <20180813104415.hatiez4soz6jvozp@depesz.com>
References: <20180813104415.hatiez4soz6jvozp@depesz.com>
hubert depesz lubaczewski <depesz@depesz.com> writes:
> 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.
Uh, why?
The only likely reason I can guess at is that you want vim to make its
own connection to the database for some purpose like autocompletion.
That's a cute idea, but from a security standpoint it sounds like a
disaster in the making. There isn't any secure way to pass down e.g.
a password (neither command line nor environment variables can be
trusted not to be visible to other users), and even if there was
I'm not sure people would be really happy with handing out their
database credentials to any random piece of code psql invokes.
> Is it possible to do in any way, or if not, any chance it could be added
> to wishlist for next versions of Pg?
You'd need to make a case for it that's a lot stronger than "I wish"
before anyone would consider this.
regards, tom lane
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: tgl@sss.pgh.pa.us, depesz@depesz.com
Subject: Re: How to get connection details from psql -> \e
In-Reply-To: <17126.1534168856@sss.pgh.pa.us>
References: <20180813104415.hatiez4soz6jvozp@depesz.com> <17126.1534168856@sss.pgh.pa.us>
* 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