Commit 4041808b authored by Tom Lane's avatar Tom Lane

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
parent 12590c5d
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment