Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Don't emit a spurious space at end of line in pg_dump of event triggers.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 2 Jul 2015 09:50:29 +0000 (12:50 +0300)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Thu, 2 Jul 2015 09:51:04 +0000 (12:51 +0300)
Backpatch to 9.3 and above, where event triggers were added.

src/bin/pg_dump/pg_dump.c

index 31b86bb315d7a570337369b5916c1b49c60e8996..06ee202b37b84767d5913b6832dabf9faf64f95a 100644 (file)
@@ -14680,13 +14680,12 @@ dumpEventTrigger(Archive *fout, EventTriggerInfo *evtinfo)
    appendPQExpBufferStr(query, fmtId(evtinfo->dobj.name));
    appendPQExpBufferStr(query, " ON ");
    appendPQExpBufferStr(query, fmtId(evtinfo->evtevent));
-   appendPQExpBufferStr(query, " ");
 
    if (strcmp("", evtinfo->evttags) != 0)
    {
        appendPQExpBufferStr(query, "\n         WHEN TAG IN (");
        appendPQExpBufferStr(query, evtinfo->evttags);
-       appendPQExpBufferStr(query, ") ");
+       appendPQExpBufferChar(query, ')');
    }
 
    appendPQExpBufferStr(query, "\n   EXECUTE PROCEDURE ");