Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6260c7c

Browse files
committed
Don't dump core on empty table.
1 parent8be6847 commit6260c7c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/bin/psql/print.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.25 2001/10/30 05:38:56 momjian Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/print.c,v 1.26 2002/04/24 15:56:38 tgl Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"print.h"
@@ -1073,7 +1073,8 @@ printTable(const char *title,
10731073
if (cells)
10741074
for (ptr=cells;*ptr;ptr++)
10751075
row_count++;
1076-
row_count /=col_count;
1076+
if (col_count>0)
1077+
row_count /=col_count;
10771078

10781079
if (opt->expanded)
10791080
lines= (col_count+1)*row_count;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp