git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ebcbc8c)
Quotes in strings injected into bki file need to escaped. In particular,
2011年4月20日 06:49:44 +0000 (09:49 +0300)
2011年4月20日 06:59:46 +0000 (09:59 +0300)
"People's Republic of China" locale on Windows was causing initdb to fail.

This fixes bug #5818 reported by yulei. On master, this makes the mapping
of "People's Republic of China" to just "China" obsolete. In 9.0 and 8.4,
just fix the escaping. Earlier versions didn't have locale names in bki
file.


diff --git a/src/bin/initdb/initdb.c b/src/bin/initdb/initdb.c
index 0aee70de1d66c520fb4a3f5d7873b1af8a00f29a..7ca4c934318ab0531f3012eba1f6989ba4c11049 100644 (file)
--- a/src/bin/initdb/initdb.c
+++ b/src/bin/initdb/initdb.c
@@ -1313,9 +1313,9 @@ bootstrap_template1(void)
bki_lines = replace_token(bki_lines, "ENCODING", encodingid);
- bki_lines = replace_token(bki_lines, "LC_COLLATE", lc_collate);
+ bki_lines = replace_token(bki_lines, "LC_COLLATE", escape_quotes(lc_collate));
- bki_lines = replace_token(bki_lines, "LC_CTYPE", lc_ctype);
+ bki_lines = replace_token(bki_lines, "LC_CTYPE", escape_quotes(lc_ctype));
/*
* Pass correct LC_xxx environment to bootstrap.
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /