aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2013-02-08 23:39:22 -0500
committerPeter Eisentraut <peter_e@gmx.net>2013-02-09 00:11:58 -0500
commit8ade58a4ea318d0ab8548ab94e49a3b80fdbeb0d (patch)
treec81c3af07716fc32cd073e8aa158ab354535d71f
parentc61e26ee3e447c0277c6c4e5a8a452dbefdc502d (diff)
downloadpostgresql-8ade58a4ea318d0ab8548ab94e49a3b80fdbeb0d.tar.gz
postgresql-8ade58a4ea318d0ab8548ab94e49a3b80fdbeb0d.zip
psql: Improve expanded print output in tuples-only mode
When there are zero result rows, in expanded mode, "(No rows)" is printed. So far, there was no way to turn this off. Now, when tuples-only mode is turned on, nothing is printed in this case.
-rw-r--r--src/bin/psql/print.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c
index 2a34fb319c3..2aa313407ef 100644
--- a/src/bin/psql/print.c
+++ b/src/bin/psql/print.c
@@ -1169,7 +1169,8 @@ print_aligned_vertical(const printTableContent *cont, FILE *fout)
if (cont->cells[0] == NULL && cont->opt->start_table &&
cont->opt->stop_table)
{
- fprintf(fout, _("(No rows)\n"));
+ if (!opt_tuples_only)
+ fprintf(fout, _("(No rows)\n"));
return;
}