1
0
mirror of https://github.com/postgres/postgres.git synced 2025-04-27 22:56:53 +03:00

Fix bogus syntax for CREATE PUBLICATION commands emitted by pg_dump.

Original coding was careless about where to insert commas.

Masahiko Sawada

Discussion: https://postgr.es/m/3427593a-61aa-b17e-64ef-383b7742d6d9@enterprisedb.com
This commit is contained in:
Tom Lane 2017-05-15 11:48:39 -04:00
parent 12590c5d33
commit 4041808b5b

View File

@ -3491,20 +3491,20 @@ dumpPublication(Archive *fout, PublicationInfo *pubinfo)
first = false;
}
if (!first)
appendPQExpBufferStr(query, ", ");
if (pubinfo->pubupdate)
{
if (!first)
appendPQExpBufferStr(query, ", ");
appendPQExpBufferStr(query, "update");
first = false;
}
if (!first)
appendPQExpBufferStr(query, ", ");
if (pubinfo->pubdelete)
{
if (!first)
appendPQExpBufferStr(query, ", ");
appendPQExpBufferStr(query, "delete");
first = false;
}