diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/commands/comment.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/commands/comment.c b/src/backend/commands/comment.c index dc8247691ab..96f47b3d0ef 100644 --- a/src/backend/commands/comment.c +++ b/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 ***/ |