Re: psql \e broken again

From: "Bort, Paul" <pbort(at)tmwsystems(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Re: psql \e broken again
Date: 2004-11-16 15:19:30
Message-ID: 735D404BD9E7EB44B9CDFC27FC88809B0582D5C7@mail2.tmwsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


From: Zeugswetter Andreas DAZ SD [mailto:ZeugswetterA(at)spardat(dot)at]
>
> I am not sure the test is valid, since %EDITOR% was used on
> the command line,
> which does it's own magic on quotes. Is there a command that
> would use the
> envvar EDITOR without putting it on the commandline ?
>
> We are talking about directly using the envvar from inside
> the program, no?
>

I wasn't sure either, but a quick trudge through my Windows-installed
software that has been ported from *nix didn't show any programs that
attempted to preserve that aspect of their behavior. CVSNT at least
attempted to invoke an external editor, so I tested with that.

I like Kevin Brown's suggestion of writing out a temporary .txt file and
'executing' it. It will follow the principle of least suprise for Windows
users. And it is suprisingly easy to wait for a child process with the NT
API. WaitForSingleObjectEx() ( http://tinyurl.com/5d4tj ) will wait with a
timeout, so the caller can handle other messages or update counters as
needed. ( We usually timeout every 1000ms and repeat the call until it
returns a non-timeout status. )

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-11-16 15:58:12 Re: psql \e broken again
Previous Message Tom Lane 2004-11-16 14:40:03 Re: GiST: PickSplit and multi-attr indexes