Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 0343a59

Browse files
committed
psql: Improve unaligned expanded output for zero rows
This used to erroneously print an empty line. Now it prints nothing.
1 parent 8ade58a commit 0343a59

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/bin/psql/print.c

+7-4
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,13 @@ print_unaligned_vertical(const printTableContent *cont, FILE *fout)
439439
}
440440

441441
/* see above in print_unaligned_text() */
442-
if (cont->opt->recordSep.separator_zero)
443-
print_separator(cont->opt->recordSep, fout);
444-
else
445-
fputc('\n', fout);
442+
if (need_recordsep)
443+
{
444+
if (cont->opt->recordSep.separator_zero)
445+
print_separator(cont->opt->recordSep, fout);
446+
else
447+
fputc('\n', fout);
448+
}
446449
}
447450
}
448451

0 commit comments

Comments
 (0)