diff options
author | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-07-26 17:46:40 -0400 |
---|---|---|
committer | Alvaro Herrera <alvherre@alvh.no-ip.org> | 2019-07-26 17:46:40 -0400 |
commit | 66abcce55f12641b0a5fd03be61c17362038c659 (patch) | |
tree | 16ef526ff67629a5d13c06476e1953430c6c927f /src | |
parent | e991b6cce3f26d979a2a47792526f3785bac116b (diff) | |
download | postgresql-66abcce55f12641b0a5fd03be61c17362038c659.tar.gz postgresql-66abcce55f12641b0a5fd03be61c17362038c659.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.c | 6 |
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 ba138062768..ed6a210bb0a 100644 --- a/src/bin/pg_basebackup/pg_basebackup.c +++ b/src/bin/pg_basebackup/pg_basebackup.c @@ -1679,9 +1679,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) || |