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

Lines changed: 7 additions & 4 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy