projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a0c8158
)
Don't dump core on empty table.
author
Tom Lane
<tgl@sss.pgh.pa.us>
Wed, 24 Apr 2002 15:56:38 +0000
(15:56 +0000)
committer
Tom Lane
<tgl@sss.pgh.pa.us>
Wed, 24 Apr 2002 15:56:38 +0000
(15:56 +0000)
src/bin/psql/print.c
patch
|
blob
|
blame
|
history
diff --git
a/src/bin/psql/print.c
b/src/bin/psql/print.c
index 20b18e815b892dc293af9fcd4eff4659f0cdacf6..5f8cbf9ab4808f9307ff54b310858814fbd4f677 100644
(file)
--- 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;