diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2013-02-09 00:05:27 -0500 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2013-02-09 00:11:58 -0500 |
commit | 0343a59d119de3fb835234fa34fbcd697b9335db (patch) | |
tree | 1e2996bcabeca6895be7381fcb8d22e2b0fb249a | |
parent | 8ade58a4ea318d0ab8548ab94e49a3b80fdbeb0d (diff) | |
download | postgresql-0343a59d119de3fb835234fa34fbcd697b9335db.tar.gz postgresql-0343a59d119de3fb835234fa34fbcd697b9335db.zip |
psql: Improve unaligned expanded output for zero rows
This used to erroneously print an empty line. Now it prints nothing.
-rw-r--r-- | src/bin/psql/print.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 2aa313407ef..0722c984a82 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -439,10 +439,13 @@ print_unaligned_vertical(const printTableContent *cont, FILE *fout) } /* see above in print_unaligned_text() */ - if (cont->opt->recordSep.separator_zero) - print_separator(cont->opt->recordSep, fout); - else - fputc('\n', fout); + if (need_recordsep) + { + if (cont->opt->recordSep.separator_zero) + print_separator(cont->opt->recordSep, fout); + else + fputc('\n', fout); + } } } |