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

Commit1a7be5c

Browse files
committed
Fix psql after newline patch for calloc(0).
Kris Jurka
1 parentb2be41a commit1a7be5c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎src/bin/psql/print.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.80 2006/02/1000:39:04 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/print.c,v 1.81 2006/02/1015:48:05 momjian Exp $
77
*/
88
#include"postgres_fe.h"
99
#include"common.h"
@@ -451,6 +451,7 @@ print_aligned_text(const char *title, const char *const * headers,
451451
* format_space contains maximum space required to store formatted string
452452
* so we prepare the formatting structures
453453
*/
454+
if (col_count>0)
454455
{
455456
intheights_total=0;
456457
structlineptr*lineptr;
@@ -470,6 +471,8 @@ print_aligned_text(const char *title, const char *const * headers,
470471
col_lineptrs[i]->ptr=format_buf[i];
471472
}
472473
}
474+
else
475+
lineptr_list=NULL;
473476

474477
/* print title */
475478
if (title&& !opt_tuples_only)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp