diff options
| author | Bruce Momjian | 2012-08-15 15:23:04 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2012-08-15 15:23:15 +0000 |
| commit | a973296598f2d1eec48138a2ce4f3e63410d9ed0 (patch) | |
| tree | 0b76eb29da9181bdfcc4189649bc0faaed4eb6bb /src/backend/parser/scansup.c | |
| parent | eb919e8fde4333d4a627d349a1460b07fc52dd3b (diff) | |
Properly escape usernames in initdb, so names with single-quotes are
supported. Also add assert to catch future breakage.
Also, improve documentation that "double"-quotes must be used in
pg_hba.conf (not single quotes).
Diffstat (limited to 'src/backend/parser/scansup.c')
| -rw-r--r-- | src/backend/parser/scansup.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/backend/parser/scansup.c b/src/backend/parser/scansup.c index 6101457a109..b8e2f71d656 100644 --- a/src/backend/parser/scansup.c +++ b/src/backend/parser/scansup.c @@ -56,6 +56,8 @@ scanstr(const char *s) * appear in pairs, so there should be another character. */ i++; + /* The bootstrap parser is not as smart, so check here. */ + Assert(s[i] == '\''); newStr[j] = s[i]; } else if (s[i] == '\\') |
