Re: Stop pgpass.conf EOL conversion - Mailing list pgadmin-support

From Dave Page
Subject Re: Stop pgpass.conf EOL conversion
Date
Msg-id CA+OCxoz_63yHX9yaia=tgR+SEQ5OotR7eRAXNTezLhOfaA=n=g@mail.gmail.com
Whole thread Raw
In response to Stop pgpass.conf EOL conversion  (Daniel Browning <db@kavod.com>)
Responses Re: Stop pgpass.conf EOL conversion
List pgadmin-support
Hi

On Thu, Sep 4, 2014 at 11:23 PM, Daniel Browning <db@kavod.com> wrote:
> Do you agree with modifying pgAdmin so that it stops converting the EOL
> characters in the pgpass.conf file from unix-style (\n) to Windows-style
> (\r\n)?
>
> It works fine with unix-style line endings, and if the file is in that format
> already, I think it should leave well enough alone.
>
> The reason the issue came up is that I would like to be able to use one pgpass
> file for both Windows applications (pgAdmin, psql under powershell, etc.) and
> cygwin applications (/usr/bin/psql). I created a symlink from the pgpass.conf
> file to .pgpass, and it works perfectly. Until, that is, I launch pgAdmin and
> it adds the Windows carriage returns. Then, cygwin's psql stops working; it
> seems to send the carriage return appended to the end of the password,
> resulting in incorrect password errors.

The primary reason that file (and others) are written with DOS line
endings is because the default editor on Windows (notepad) can't cope
with *nix style line ends. This is obviously a PITA, as it requires
users to install a better editor (which is arguably a very good idea
anyway, but we don't want to force it on users who may just be setting
up an app on a machine for someone else for example).

> I could also just not use cygwin, but as a long-term Linux user, I find that
> when I am forced to use Windows, as in this case, it is significantly easier
> for me to use cygwin than to learn all the Windows-equivalent commandline
> tools, which in many cases do not even exist.

Have you tried Msys? Not suggesting you should switch, but it would be
interesting to know how it behaves.

> What do you think?

At the moment I'm leaning towards leaving it as-is. I see your
problem, but you're the only person to report it in 12+ years that I
can remember. I suspect the notepad issue would inconvenience far more
users. I suppose we could make it a configurable option.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgadmin-support by date:

Previous
From: Daniel Browning
Date:
Subject: Stop pgpass.conf EOL conversion
Next
From: Christoph Berg
Date:
Subject: Re: PgAdmin Crash Dialog