psql and pgpass.conf on Windows

Поиск
Список
Период
Сортировка
От pf@pfortin.com
Тема psql and pgpass.conf on Windows
Дата
Msg-id 20230629224200.080cc1a4.pfortin@pfortin.com
обсуждение исходный текст
Ответы Re: psql and pgpass.conf on Windows
Re: psql and pgpass.conf on Windows
Список pgsql-general
Hi,

Trying to write a script that will run on Linux, Windows, and Mac.

The "standard" credentials file contains:
   hostname:port:database:username:password
in:
Linux:   .pgpass
Windows: %APPDATA%\postgresql\pgpass.conf
Mac:     (I'm not there yet...)

On Linux, this works.  However, on Windows, psql will not read
pgpass.conf (tried in just about every location I could think of)

Even:   "set PGPASSFILE=<path to file>" does not work.

Finally, out of frustration, tried:
  set PGPASSWORD=<password> 
and that got me past the password issue, only to now get:
    'more' is not recognized as an internal or external command,
    operable program or batch file.

Given the number of queries about pgpass.conf and finding no answer that
works, is there no bug report on this?

Thinking that psql was not adjusted for Windows, tried naming the file:
  .pgpass
  .pgpass.conf
also in various locations to no avail...

What am I (and all the others found in searches) missing? Or are there 
unresolved bugs in psql?
   - pgpass.conf
   - expecting external executable: 'more'

Thanks,  
Pierre




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

Предыдущее
От: Umut TEKİN
Дата:
Сообщение: Re: need explanation about an explain plan
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: psql and pgpass.conf on Windows