1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-15 19:21:59 +03:00

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).
This commit is contained in:
Bruce Momjian
2012-08-15 11:23:04 -04:00
parent eb919e8fde
commit a973296598
3 changed files with 6 additions and 5 deletions

View File

@ -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] == '\\')