We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
1 parent74cdf92 commite0d48c3Copy full SHA for e0d48c3
src/interfaces/libpq/fe-exec.c
@@ -7,7 +7,7 @@
7
*
8
9
* IDENTIFICATION
10
- * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.8 1996/07/2806:54:15 scrappy Exp $
+ * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.9 1996/07/31 02:06:00 scrappy Exp $
11
12
*-------------------------------------------------------------------------
13
*/
@@ -887,7 +887,9 @@ PQprint(FILE *fout,
887
if (po->pager&&fout==stdout&&isatty(fileno(stdout))) {
888
/* try to pipe to the pager program if possible */
889
#ifdefTIOCGWINSZ
890
-if (ioctl(fileno(stdout),TIOCGWINSZ,&screen_size)==-1)
+if (ioctl(fileno(stdout),TIOCGWINSZ,&screen_size)==-1||
891
+screen_size.ws_col==0||
892
+screen_size.ws_row==0)
893
{
894
#endif
895
screen_size.ws_row=24;
@@ -897,6 +899,7 @@ PQprint(FILE *fout,
897
899
898
900
pagerenv=getenv("PAGER");
901
if (pagerenv!=NULL&&
902
+pagerenv[0]!='\0'&&
903
!po->html3&&
904
((po->expanded&&
905
nTups* (nFields+1) >=screen_size.ws_row)||