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
REL7_0_PATCHES
Bruce Momjian 26 years ago
parent 8cfb8c68ea
commit e474dd182a
  1. 12
      src/backend/commands/comment.c

@ -171,9 +171,15 @@ void CreateComments(Oid oid, char *comment) {
}
} else {
desctuple = heap_formtuple(tupDesc, values, nulls);
heap_insert(description, desctuple);
modified = TRUE;
/*** Only if comment is non-blank do we form a new tuple ***/
if ((comment != NULL) && (strlen(comment) > 0)) {
desctuple = heap_formtuple(tupDesc, values, nulls);
heap_insert(description, desctuple);
modified = TRUE;
}
}
/*** Complete the scan, update indices, if necessary ***/

Loading…
Cancel
Save