Skip to content
Snippets Groups Projects
Commit 6260c7c1 authored by Tom Lane's avatar Tom Lane
Browse files

Don't dump core on empty table.

parent 8be68479
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.25 2001/10/30 05:38:56 momjian Exp $
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.26 2002/04/24 15:56:38 tgl Exp $
*/
#include "postgres_fe.h"
#include "print.h"
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment