From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org> |
Subject: | Re: [HACKERS] use of pager on Windows psql |
Date: | 2008-05-17 23:36:06 |
Message-ID: | 200805172336.m4HNa7G22034@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
Andrew Dunstan wrote:
> > Not sure why ware are not. Should we enabled that code on Win32 and see
> > how it works? Can you test it? Was it some MinGW limitation? I do see
> > isatty() being used on lots of platforms.
> >
> > This is kind of odd. Ah, I bet it came from libpq's PQprint(), which I
> > think we had working on Win32 long before we had psql working and
> > perhaps I copied it from there. I don't see the Win32 checks around
> > isatty() anywhere else.
> >
> >
> >> In fact, it looks to me like it would be much more sensible to #include
> >> "settings.h" and then simply test pset.notty for all platforms.
> >>
> >
> > Yes, we could do that but does the isatty() value ever change while psql
> > is running? When you do '\g filename' does stdout then have isatty as
> > false?
> >
>
>
> Good point. I think the best thing would just be to remove the #ifndef
> WIN32 / #endif lines
OK, patch applied to remove the Win32 test in both places.
I was wrong about \g filename changing stdout, I think. It keeps stdout
but uses a different output stream. I am just unsure, given all the
features of psql, wether it could change stdin/stdout while running in
some way.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ If your life is a hard drive, Christ can be your backup. +
Attachment | Content-Type | Size |
---|---|---|
/rtmp/diff | text/x-diff | 1.7 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2008-05-17 23:44:48 | Re: windows builds hanging on regression checks |
Previous Message | Tom Lane | 2008-05-17 23:23:20 | Re: windows builds hanging on regression checks |
From | Date | Subject | |
---|---|---|---|
Next Message | daveg | 2008-05-17 23:38:18 | Re: pg_dump lock timeout - resend |
Previous Message | Tom Lane | 2008-05-17 22:52:54 | Re: psql command aliases support |