Re: psql and pgpass.conf on Windows

Поиск
Список
Период
Сортировка
От Kirk Wolak
Тема Re: psql and pgpass.conf on Windows
Дата
Msg-id CACLU5mTxsGTafjfo+cZXtV_y12=TdJE06Qp7mS2aR0YKBBcN2w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: psql and pgpass.conf on Windows  (pf@pfortin.com)
Ответы Re: psql and pgpass.conf on Windows  (Julien Rouhaud <rjuju123@gmail.com>)
Список pgsql-general
On Fri, Jun 30, 2023 at 8:39 AM <pf@pfortin.com> wrote:
On Fri, 30 Jun 2023 11:16:36 +0800 Julien Rouhaud wrote:

>Hi,
>
>On Thu, Jun 29, 2023 at 10:42:00PM -0400, pf@pfortin.com wrote:
>>
>> Windows: %APPDATA%\postgresql\pgpass.conf
>>
 
echo %APPDATA%
C:\Users\Pierre\AppData\Roaming

>Now, since setting PGPASSFILE also doesn't work I start to wonder if there's
>another problem.  Does the password (or any other field) contain some non-ASCII
>characters? 

type %APPDATA%\postgresql\pgpass.conf
127.0.0.1:5432:ncsbe:postgres:<pw> 
 (only ASCII characters and no trailing space)
was using "localhost" before trying 127.0.0.1
even "*:*:..." failed.

Pierre, I use my pgpass .conf in windows.

copy that file to your current directory.
and set
PGPASSFILE=pgpass.conf

and try to get in.
Next, please specify the complete command line for psql you are using...
This way you know you are not passing in a strange variable.

If I set PGPASSFILE to a bad filename, I get a password prompt.

But the only time I've seen this was someone not specifying the dbname correctly.

FWIW, I discovered that psql is case sensitive on the dbname, without quoting it!

HTH,

Kirk

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

Предыдущее
От: Nathan Bossart
Дата:
Сообщение: Is anyone using db_user_namespace?
Следующее
От: Julien Rouhaud
Дата:
Сообщение: Re: psql and pgpass.conf on Windows