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

From Bort, Paul
Subject Re: psql \e broken again
Date
Msg-id 735D404BD9E7EB44B9CDFC27FC88809B0582D5C7@mail2.tmwsystems.com
Whole thread Raw
In response to psql \e broken again  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: psql \e broken again  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
<br /><p><font size="2">From: Zeugswetter Andreas DAZ SD [<a
href="mailto:ZeugswetterA@spardat.at">mailto:ZeugswetterA@spardat.at</a>]</font><br/><font size="2">> </font><br
/><fontsize="2">> I am not sure the test is valid, since %EDITOR% was used on </font><br /><font size="2">> the
commandline,</font><br /><font size="2">> which does it's own magic on quotes. Is there a command that </font><br
/><fontsize="2">> would use the </font><br /><font size="2">> envvar EDITOR without putting it on the commandline
?</font><br/><font size="2">> </font><br /><font size="2">> We are talking about directly using the envvar from
inside</font><br /><font size="2">> the program, no?</font><br /><font size="2">> </font><p><font size="2">I
wasn'tsure either, but a quick trudge through my Windows-installed software that has been ported from *nix didn't show
anyprograms that attempted to preserve that aspect of their behavior. CVSNT at least attempted to invoke an external
editor,so I tested with that. </font><p><font size="2">I like Kevin Brown's suggestion of writing out a temporary .txt
fileand 'executing' it. It will follow the principle of least suprise for Windows users. And it is suprisingly easy to
waitfor a child process with the NT API. WaitForSingleObjectEx() ( <a href="http://tinyurl.com/5d4tj"
target="_blank">http://tinyurl.com/5d4tj</a>) will wait with a timeout, so the caller can handle other messages or
updatecounters as needed. ( We usually timeout every 1000ms and repeat the call until it returns a non-timeout status.
)</font>

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: GiST: PickSplit and multi-attr indexes
Next
From: Tom Lane
Date:
Subject: Re: psql \e broken again