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.
This commit is contained in:
Peter Eisentraut 2013-02-08 23:39:22 -05:00
parent c61e26ee3e
commit 8ade58a4ea
1 changed files with 2 additions and 1 deletions

View 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;
}