Re: How to get connection details from psql -> \e - Mailing list pgsql-general

From hubert depesz lubaczewski
Subject Re: How to get connection details from psql -> \e
Date
Msg-id 20180813160414.lojhxm7uhqpqeroh@depesz.com
Whole thread Raw
In response to Re: How to get connection details from psql -> \e  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
On Mon, Aug 13, 2018 at 10:00:56AM -0400, Tom Lane wrote:
> 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 precisely what I'm looking for.

> 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.

I think that passing all-but-password would be good enough.

At the very least for my usecases, as I tend to use pgpass and other
non-interactive authentications.

Best regards,

depesz



pgsql-general by date:

Previous
From: Tomas Vondra
Date:
Subject: Re: Fwd: is there any adverse effect on DB if I set autovacuum scalefactor to zero?
Next
From: hubert depesz lubaczewski
Date:
Subject: Re: How to get connection details from psql -> \e