]> granicus.if.org Git - postgresql/commitdiff
psql: Improve expanded print output in tuples-only mode
authorPeter Eisentraut <peter_e@gmx.net>
Sat, 9 Feb 2013 04:39:22 +0000 (23:39 -0500)
committerPeter Eisentraut <peter_e@gmx.net>
Sat, 9 Feb 2013 05:11:58 +0000 (00:11 -0500)
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.

src/bin/psql/print.c

index 2a34fb319c3e22518871592f68046332a3592fbc..2aa313407ef163769a45e5bd444b96c6892eda45 100644 (file)
@@ -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;
        }