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

Commite474dd1

Browse files
committed
Bruce,
Attached is a small fix for a stupid mistake I made in comment.c- an attempt to drop a non-existent comment would dump core :-(.Sometimes, I'm as sharp as a marble.Sorry,Mike Mascari
1 parent8cfb8c6 commite474dd1

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

‎src/backend/commands/comment.c

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,15 @@ void CreateComments(Oid oid, char *comment) {
171171
}
172172

173173
}else {
174-
desctuple=heap_formtuple(tupDesc,values,nulls);
175-
heap_insert(description,desctuple);
176-
modified= TRUE;
174+
175+
/*** Only if comment is non-blank do we form a new tuple ***/
176+
177+
if ((comment!=NULL)&& (strlen(comment)>0)) {
178+
desctuple=heap_formtuple(tupDesc,values,nulls);
179+
heap_insert(description,desctuple);
180+
modified= TRUE;
181+
}
182+
177183
}
178184

179185
/*** Complete the scan, update indices, if necessary ***/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp