mirror of
https://github.com/postgres/postgres.git
synced 2025-07-12 21:01:52 +03:00
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
This commit is contained in:
@ -171,11 +171,17 @@ void CreateComments(Oid oid, char *comment) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
/*** Only if comment is non-blank do we form a new tuple ***/
|
||||||
|
|
||||||
|
if ((comment != NULL) && (strlen(comment) > 0)) {
|
||||||
desctuple = heap_formtuple(tupDesc, values, nulls);
|
desctuple = heap_formtuple(tupDesc, values, nulls);
|
||||||
heap_insert(description, desctuple);
|
heap_insert(description, desctuple);
|
||||||
modified = TRUE;
|
modified = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/*** Complete the scan, update indices, if necessary ***/
|
/*** Complete the scan, update indices, if necessary ***/
|
||||||
|
|
||||||
heap_endscan(scan);
|
heap_endscan(scan);
|
||||||
|
Reference in New Issue
Block a user