Content-Length: 264810 | pFad | http://github.com/postgrespro/postgres/commit/52608f3416075dc57a8e12ff0c3e6af03549c7d5

29 Don't uselessly escape a string that doesn't need escaping · postgrespro/postgres@52608f3 · GitHub
Skip to content

Commit 52608f3

Browse files
alvherreibarwick
andcommitted
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
1 parent 46c1932 commit 52608f3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/bin/pg_basebackup/pg_basebackup.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,9 +1650,9 @@ GenerateRecoveryConf(PGconn *conn)
16501650

16511651
if (replication_slot)
16521652
{
1653-
escaped = escape_quotes(replication_slot);
1654-
appendPQExpBuffer(recoveryconfcontents, "primary_slot_name = '%s'\n", replication_slot);
1655-
free(escaped);
1653+
/* unescaped: ReplicationSlotValidateName allows [a-z0-9_] only */
1654+
appendPQExpBuffer(recoveryconfcontents, "primary_slot_name = '%s'\n",
1655+
replication_slot);
16561656
}
16571657

16581658
if (PQExpBufferBroken(recoveryconfcontents) ||

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/52608f3416075dc57a8e12ff0c3e6af03549c7d5

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy