From: Tom Lane Date: Wed, 24 Apr 2002 15:56:38 +0000 (+0000) Subject: Don't dump core on empty table. X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=d15c8d2bd5862e761b1979d295e12131c5dec5d3;p=users%2Fbernd%2Fpostgres.git Don't dump core on empty table. --- diff --git a/src/bin/psql/print.c b/src/bin/psql/print.c index 20b18e815b..5f8cbf9ab4 100644 --- a/src/bin/psql/print.c +++ b/src/bin/psql/print.c @@ -1073,7 +1073,8 @@ printTable(const char *title, if (cells) for (ptr = cells; *ptr; ptr++) row_count++; - row_count /= col_count; + if (col_count > 0) + row_count /= col_count; if (opt->expanded) lines = (col_count + 1) * row_count;