aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlvaro Herrera <alvherre@alvh.no-ip.org>2019-07-26 17:46:40 -0400
committerAlvaro Herrera <alvherre@alvh.no-ip.org>2019-07-26 17:46:40 -0400
commit5ac684381df1783b0855d3b53b1c6d4736843695 (patch)
tree909693590ca9f0f5eeb2c21215c1d4561b682d4c
parentd095b2fe676a929837715ece04ae19e0d8a1dcc3 (diff)
downloadpostgresql-5ac684381df1783b0855d3b53b1c6d4736843695.tar.gz
postgresql-5ac684381df1783b0855d3b53b1c6d4736843695.zip
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 15f43f9432b..068404887d0 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -1712,9 +1712,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) ||