Skip to content

Commit e2cd62c

Browse files
committed
In psql, test for output to stdout when forcing pager for wide output.
1 parent 2413ac9 commit e2cd62c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bin/psql/print.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.104 2008/05/17 17:52:14 tgl Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.105 2008/05/17 21:40:44 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99

@@ -634,7 +634,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout)
634634
}
635635

636636
/* If we wrapped beyond the display width, use the pager */
637-
if (!is_pager && output_columns > 0 &&
637+
if (!is_pager && fout == stdout && output_columns > 0 &&
638638
(output_columns < total_header_width || output_columns < width_total))
639639
{
640640
fout = PageOutput(INT_MAX, cont->opt->pager); /* force pager */

0 commit comments

Comments
 (0)