aboutsummaryrefslogtreecommitdiff
path: root/src
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
commit0994cfc0ac853de4245f003698160fe1b8c577bd (patch)
treef3c881858c9fa2a0621d089b110c81eaf7ae7944 /src
parent8ab66081ca496fd74c406e435e20f4264881a02d (diff)
downloadpostgresql-0994cfc0ac853de4245f003698160fe1b8c577bd.tar.gz
postgresql-0994cfc0ac853de4245f003698160fe1b8c577bd.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
Diffstat (limited to 'src')
-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 77a7c148bae..9207109ba3b 100644
--- a/src/bin/pg_basebackup/pg_basebackup.c
+++ b/src/bin/pg_basebackup/pg_basebackup.c
@@ -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) ||