diff options
author | Bruce Momjian <bruce@momjian.us> | 2008-05-17 21:40:44 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2008-05-17 21:40:44 +0000 |
commit | e2cd62c3e1e666b11f6e569b21bbe1b7c6acbe8f (patch) | |
tree | 2558a46674b5ebff6c3e769059831125cc237f54 /src | |
parent | 2413ac97e9f49e49bbe12b35676ff1277b8ebc64 (diff) | |
download | postgresql-e2cd62c3e1e666b11f6e569b21bbe1b7c6acbe8f.tar.gz postgresql-e2cd62c3e1e666b11f6e569b21bbe1b7c6acbe8f.zip |
In psql, test for output to stdout when forcing pager for wide output.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/print.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index e7f0b89f1e7..ad57cae9a8e 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -3,7 +3,7 @@ * * Copyright (c) 2000-2008, PostgreSQL Global Development Group * - * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.104 2008/05/17 17:52:14 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.105 2008/05/17 21:40:44 momjian Exp $ */ #include "postgres_fe.h" @@ -634,7 +634,7 @@ print_aligned_text(const printTableContent *cont, FILE *fout) } /* If we wrapped beyond the display width, use the pager */ - if (!is_pager && output_columns > 0 && + if (!is_pager && fout == stdout && output_columns > 0 && (output_columns < total_header_width || output_columns < width_total)) { fout = PageOutput(INT_MAX, cont->opt->pager); /* force pager */ |