psql's print.c contains this piece of code:

/*
* PageOutput
*
* Tests if pager is needed and returns appropriate FILE pointer.
*/
FILE *
PageOutput(int lines, unsigned short int pager)
{
   /* check whether we need / can / are supposed to use pager */
   if (pager
#ifndef WIN32
       &&
       isatty(fileno(stdin)) &&
       isatty(fileno(stdout))
#endif
       )
   {



Why are we not doing the isatty tests on Windows? We can and do use isatty on Windows elsewhere, so I'm a bit mystified about this.

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.

cheers

andrew

--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to