...with thunderbird plain-text sorted...
$ diff -c parse_utilcmd_old.c parse_utilcmd.c
*** parse_utilcmd_old.c 2018-12-11 12:44:52.288309000 +0100
--- parse_utilcmd.c 2018-12-11 12:44:52.208308782 +0100
***************
*** 918,923 ****
--- 918,941 ----
RelationGetRelationName(relation));
}
+ /*
+ * Copy the comment on the object itself, if requested.
+ */
+ if ((table_like_clause->options & CREATE_TABLE_LIKE_COMMENTS) &&
+ (comment = GetComment(relation->rd_id,
+ RelationRelationId,
+ 0)) != NULL)
+ {
+ CommentStmt *stmt = makeNode(CommentStmt);
+
+ stmt->objtype = get_relkind_objtype(relation->rd_rel->relkind);
+ stmt->object = (Node *)
list_make2(makeString(cxt->relation->schemaname),
+ makeString(cxt->relation->relname));
+ stmt->comment = comment;
+
+ cxt->alist = lappend(cxt->alist, stmt);
+ }
+
tupleDesc = RelationGetDescr(relation);
constr = tupleDesc->constr;