Re: psql \e broken again - Mailing list pgsql-hackers

From Tom Lane
Subject Re: psql \e broken again
Date
Msg-id 8069.1100533310@sss.pgh.pa.us
Whole thread Raw
In response to Re: psql \e broken again  ("Zeugswetter Andreas DAZ SD" <ZeugswetterA@spardat.at>)
List pgsql-hackers
"Zeugswetter Andreas DAZ SD" <ZeugswetterA@spardat.at> writes:
>> Agreed, no quotes on Unix.  I'm just wondering what to do on Windows.

> I would require the user to add quotes around his executable if it has
> spaces.

> set EDITOR="C:/Program Files/vim/vim63/gvim.exe" -y

I think this policy is OK for the Mac OS X case, but I am wondering
if it will cause any compatibility problems on Windows.  In particular,
if other programs expect to double-quote EDITOR themselves, then there'd
be no way to make the same value work for both PG and the others.  So it
seems like we need to look and see if there's precedent for the handling
of EDITOR in Unix programs transplanted to Windows.

We could maybe compromise with (again, for Windows only) a policy like
"double-quote unless the value already contains at least one
double-quote".  This should work conveniently for everybody except the
user who wants EDITOR='gvim.exe -y' on Windows; he'll have to add
some useless-looking double quotes a la EDITOR='"gvim.exe" -y'.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Odd plpgsql behaviour
Next
From: "Zeugswetter Andreas DAZ SD"
Date:
Subject: Re: psql \e broken again