1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Fix broken pg_dump code for dumping comments on event triggers.

This never worked, I think.  Per report from Marc Munro.

In passing, fix funny spacing in the COMMENT ON command as a result of
excess space in the "label" string.
This commit is contained in:
Tom Lane
2015-01-05 19:27:09 -05:00
parent 54a8abc2b7
commit bb1e2426bf

View File

@@ -14432,7 +14432,7 @@ dumpEventTrigger(Archive *fout, EventTriggerInfo *evtinfo)
}
appendPQExpBuffer(query, ";\n");
}
appendPQExpBuffer(labelq, "EVENT TRIGGER %s ",
appendPQExpBuffer(labelq, "EVENT TRIGGER %s",
fmtId(evtinfo->dobj.name));
ArchiveEntry(fout, evtinfo->dobj.catId, evtinfo->dobj.dumpId,
@@ -14441,7 +14441,7 @@ dumpEventTrigger(Archive *fout, EventTriggerInfo *evtinfo)
query->data, "", NULL, NULL, 0, NULL, NULL);
dumpComment(fout, labelq->data,
NULL, NULL,
NULL, evtinfo->evtowner,
evtinfo->dobj.catId, 0, evtinfo->dobj.dumpId);
destroyPQExpBuffer(query);