small cleanup: unify scanstr() functions
John Naylor <john.naylor@2ndquadrant.com>
From: John Naylor <john.naylor@2ndquadrant.com>
To: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2020-10-01T12:09:28Z
Lists: pgsql-hackers
Attachments
- 0001-Unify-scanstr-implementations.patch (application/x-patch) patch 0001
Hi, Looking at the guc file code, GUC_scanstr() is almost the same as the exported function scanstr(), except the latter requires finicky extra coding around double quotes both in its callers and while creating the input. In the attached, the GUC_scanstr() function body is moved to scansup.c to replace scanstr(), but with a different order of if-statements to make the diff smaller. Since we have control over what goes in the BKI file, we can use single-quoted escape strings there, allowing removal of special case code for double quotes. -- John Naylor https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Commits
-
Make postgres.bki use the same literal-string syntax as postgresql.conf.
- 97b61448262e 14.0 landed