Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commite0d48c3

Browse files
committed
Fixes: Floating point exception in psql
Submitted by: Dan McGuirk <mcguirk@indirect.com>
1 parent74cdf92 commite0d48c3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

‎src/interfaces/libpq/fe-exec.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.8 1996/07/2806:54:15 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.9 1996/07/31 02:06:00 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -887,7 +887,9 @@ PQprint(FILE *fout,
887887
if (po->pager&&fout==stdout&&isatty(fileno(stdout))) {
888888
/* try to pipe to the pager program if possible */
889889
#ifdefTIOCGWINSZ
890-
if (ioctl(fileno(stdout),TIOCGWINSZ,&screen_size)==-1)
890+
if (ioctl(fileno(stdout),TIOCGWINSZ,&screen_size)==-1||
891+
screen_size.ws_col==0||
892+
screen_size.ws_row==0)
891893
{
892894
#endif
893895
screen_size.ws_row=24;
@@ -897,6 +899,7 @@ PQprint(FILE *fout,
897899
#endif
898900
pagerenv=getenv("PAGER");
899901
if (pagerenv!=NULL&&
902+
pagerenv[0]!='\0'&&
900903
!po->html3&&
901904
((po->expanded&&
902905
nTups* (nFields+1) >=screen_size.ws_row)||

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp