Re: How to get connection details from psql -> \e

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: How to get connection details from psql -> \e
Дата
Msg-id 17126.1534168856@sss.pgh.pa.us
обсуждение исходный текст
Ответ на How to get connection details from psql -> \e  (hubert depesz lubaczewski <depesz@depesz.com>)
Ответы Re: How to get connection details from psql -> \e  (hubert depesz lubaczewski <depesz@depesz.com>)
Список pgsql-general
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


В списке pgsql-general по дате отправления:

Предыдущее
От: Tomas Vondra
Дата:
Сообщение: Re: is there any adverse effect on DB if I set autovacuum scalefactor to zero?
Следующее
От: Adrian Klaver
Дата:
Сообщение: Re: Replication failure, slave requesting old segments