mirror of
https://github.com/postgres/postgres.git
synced 2025-09-06 13:46:51 +03:00
Fix up some misusage of appendStringInfo() and friends
Change to appendStringInfoChar() or appendStringInfoString() where those can be used. Author: David Rowley <david.rowley@2ndquadrant.com> Reviewed-by: Ashutosh Bapat <ashutosh.bapat@enterprisedb.com>
This commit is contained in:
@@ -1117,9 +1117,9 @@ fetch_table_list(WalReceiverConn *wrconn, List *publications)
|
||||
Assert(list_length(publications) > 0);
|
||||
|
||||
initStringInfo(&cmd);
|
||||
appendStringInfo(&cmd, "SELECT DISTINCT t.schemaname, t.tablename\n"
|
||||
" FROM pg_catalog.pg_publication_tables t\n"
|
||||
" WHERE t.pubname IN (");
|
||||
appendStringInfoString(&cmd, "SELECT DISTINCT t.schemaname, t.tablename\n"
|
||||
" FROM pg_catalog.pg_publication_tables t\n"
|
||||
" WHERE t.pubname IN (");
|
||||
first = true;
|
||||
foreach(lc, publications)
|
||||
{
|
||||
@@ -1130,9 +1130,9 @@ fetch_table_list(WalReceiverConn *wrconn, List *publications)
|
||||
else
|
||||
appendStringInfoString(&cmd, ", ");
|
||||
|
||||
appendStringInfo(&cmd, "%s", quote_literal_cstr(pubname));
|
||||
appendStringInfoString(&cmd, quote_literal_cstr(pubname));
|
||||
}
|
||||
appendStringInfoString(&cmd, ")");
|
||||
appendStringInfoChar(&cmd, ')');
|
||||
|
||||
res = walrcv_exec(wrconn, cmd.data, 2, tableRow);
|
||||
pfree(cmd.data);
|
||||
|
Reference in New Issue
Block a user