Re: [GENERAL] Preventing psql from attempting to access ~/.pgpassfile.

Поиск
Список
Период
Сортировка
От Justin Pryzby
Тема Re: [GENERAL] Preventing psql from attempting to access ~/.pgpassfile.
Дата
Msg-id 20171017061931.GA13880@telsasoft.com
обсуждение исходный текст
Ответ на [GENERAL] Preventing psql from attempting to access ~/.pgpass file.  (Allan Kamau <kamauallan@gmail.com>)
Список pgsql-general
On Tue, Oct 17, 2017 at 09:06:59AM +0300, Allan Kamau wrote:
> Is there a way to instruct psql not to try reading ~/.pgpass file?

https://www.postgresql.org/docs/current/static/libpq-envars.html
PGPASSFILE behaves the same as the passfile connection parameter.
passfile
Specifies the name of the file used to store passwords (see Section 33.15). Defaults to ~/.pgpass, or
%APPDATA%\postgresql\pgpass.confon Microsoft Windows. (No error is reported if this file does not exist.)
 

https://www.postgresql.org/docs/9.6/static/libpq-envars.html
PGPASSFILE specifies the name of the password file to use for lookups. If not set, it defaults to ~/.pgpass (see
Section31.15).
 

verifying it doesn't access the default:
pryzbyj@pryzbyj:~$ echo quit |PGPASSFILE=/nonextant strace psql 2>&1 |grep -E 'nonex|pgpass'
stat("/nonextant", 0x7fffbd13c9f0)      = -1 ENOENT (No such file or directory)
pryzbyj@pryzbyj:~$ 


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: Re: [GENERAL] Making subscribers read only in Postgres 10 logical replication
Следующее
От: Murtuza Zabuawala
Дата:
Сообщение: Re: [GENERAL] Preventing psql from attempting to access ~/.pgpass file.