Re: Stop pgpass.conf EOL conversion

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Daniel Browning <db(at)kavod(dot)com>
Cc: pgAdmin Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Stop pgpass.conf EOL conversion
Date: 2014-09-05 07:57:21
Message-ID: CA+OCxoz_63yHX9yaia=tgR+SEQ5OotR7eRAXNTezLhOfaA=n=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

Hi

On Thu, Sep 4, 2014 at 11:23 PM, Daniel Browning <db(at)kavod(dot)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

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Christoph Berg 2014-09-05 08:50:33 Re: PgAdmin Crash Dialog
Previous Message Daniel Browning 2014-09-04 22:23:56 Stop pgpass.conf EOL conversion