Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Hackers > use of pager on...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 3 Topic 9381 of 10966
Post > Topic >>

use of pager on Windows psql

by andrew@[EMAIL PROTECTED] (Andrew Dunstan) May 17, 2008 at 04:45 PM

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@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
 




 3 Posts in Topic:
use of pager on Windows psql
andrew@[EMAIL PROTECTED]   2008-05-17 16:45:20 
Re: use of pager on Windows psql
bruce@[EMAIL PROTECTED]   2008-05-17 17:46:04 
Re: use of pager on Windows psql
andrew@[EMAIL PROTECTED]   2008-05-17 18:36:45 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 13:50:22 CST 2008.