From c99e41f686bae0e35eafe92a970e77cbdb1db17c Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 5 Jan 2015 19:27:06 -0500 Subject: [PATCH] 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. --- src/bin/pg_dump/pg_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c index 7837b2104d..98403e7562 100644 --- a/src/bin/pg_dump/pg_dump.c +++ b/src/bin/pg_dump/pg_dump.c @@ -14769,7 +14769,7 @@ dumpEventTrigger(Archive *fout, EventTriggerInfo *evtinfo) } appendPQExpBufferStr(query, ";\n"); } - appendPQExpBuffer(labelq, "EVENT TRIGGER %s ", + appendPQExpBuffer(labelq, "EVENT TRIGGER %s", fmtId(evtinfo->dobj.name)); ArchiveEntry(fout, evtinfo->dobj.catId, evtinfo->dobj.dumpId, @@ -14778,7 +14778,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); -- 2.40.0