summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera2019-07-26 21:46:40 +0000
committerAlvaro Herrera2019-07-26 21:46:40 +0000
commit0f9133b66b567312f23e39eb767d6e6546aa590d (patch)
tree8cf86bb481abb4c655896bdffa21af57a2a6e0a3
parentf6c7c64e9fc8cdc8217fbc46a00e94b4e33856d2 (diff)
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
-rw-r--r--src/bin/pg_basebackup/pg_basebackup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/pg_basebackup/pg_basebackup.c b/src/bin/pg_basebackup/pg_basebackup.c
index ef1b63bc7be..a783d63df71 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1555,9 +1555,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) ||