Don't uselessly escape a string that doesn't need escaping

Per gripe from Ian Barwick

Co-authored-by: Ian Barwick <ian@2ndquadrant.com>
Discussion: https://postgr.es/m/CABvVfJWNnNKb8cHsTLhkTsvL1+G6BVcV+57+w1JZ61p8YGPdWQ@mail.gmail.com
This commit is contained in:
Alvaro Herrera 2019-07-26 17:46:40 -04:00
parent 8ab66081ca
commit 0994cfc0ac
1 changed files with 3 additions and 3 deletions

View File

@ -1716,9 +1716,9 @@ GenerateRecoveryConf(PGconn *conn)
if (replication_slot)
{
escaped = escape_quotes(replication_slot);
appendPQExpBuffer(recoveryconfcontents, "primary_slot_name = '%s'\n", replication_slot);
free(escaped);
/* unescaped: ReplicationSlotValidateName allows [a-z0-9_] only */
appendPQExpBuffer(recoveryconfcontents, "primary_slot_name = '%s'\n",
replication_slot);
}
if (PQExpBufferBroken(recoveryconfcontents) ||