Re: Comments in .pgpass file...

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: Comments in .pgpass file...
Дата
Msg-id CAKFQuwY=5_rReQ9dW7gh_ivuSGKg6F4G=O6y1ruCg4zB0svKjA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Comments in .pgpass file...  (Erik Wienhold <ewie@ewie.name>)
Ответы Re: Comments in .pgpass file...
Список pgsql-admin
On Monday, May 20, 2024, Erik Wienhold <ewie@ewie.name> wrote:
On 2024-05-21 03:01 +0200, Ron Johnson wrote:
> It seems that psql (or maybe libpq) doesn't like trailing comments.
>
> This works:
> 10.143.170.206:5432:*:11026270:Blarge
>
> But this does not:
> 10.143.170.206:5432:*:11026270:Blarge # Host name: fubar

How should libpq know where the password ends and the comment begins
while still accepting passwords that contain "#"?  The password is
everything between the 4th unescaped colon and the end of line.

This could be made explicit in the docs.  But the docs don't even say
that you can put entries and comments one the same line.

As written the docs say if your password contain : or \ you should escape that character with a \ …

I’m not that surprised that a reader expected the password to end at the first space.

David J.

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

Предыдущее
От: Erik Wienhold
Дата:
Сообщение: Re: Comments in .pgpass file...
Следующее
От: Erik Wienhold
Дата:
Сообщение: Re: Comments in .pgpass file...