diff options
Diffstat (limited to 'src/bin/psql/print.c')
-rw-r--r-- | src/bin/psql/print.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 481f76f343e..15d40a806a9 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -18,7 +18,7 @@ #include <libpq-fe.h> #include <postgres_ext.h> /* for Oid type */ -#define DEFAULT_PAGER "/bin/more" +#define DEFAULT_PAGER "more" @@ -325,6 +325,11 @@ print_aligned_vertical(const char *title, const char * const * headers, dwidth = 0; char *divider; + if (cells[0] == NULL) { + puts("(No rows)\n"); + return; + } + /* count columns and find longest header */ for (ptr = headers; *ptr; ptr++) { |