Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit d545967

Browse files
committed
Teach chklocale.c about a few names for frontend-only encodings,
since this will allow initdb to reject attempts to initdb in a locale that uses such an encoding. We'll probably find out more such names during beta ...
1 parent 1f32999 commit d545967

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

src/port/chklocale.c

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/port/chklocale.c,v 1.2 2007/09/28 23:36:06 tgl Exp $
11+
* $PostgreSQL: pgsql/src/port/chklocale.c,v 1.3 2007/09/29 00:01:43 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -31,7 +31,10 @@
3131

3232
/*
3333
* This table needs to recognize all the CODESET spellings for supported
34-
* backend encodings. We don't need to handle frontend-only encodings.
34+
* backend encodings, as well as frontend-only encodings where possible
35+
* (the latter case is currently only needed for initdb to recognize
36+
* error situations).
37+
*
3538
* Note that we search the table with pg_strcasecmp(), so variant
3639
* capitalizations don't need their own entries.
3740
*/
@@ -138,6 +141,22 @@ static const struct encoding_match encoding_match_list[] = {
138141
{PG_ISO_8859_8, "ISO8859-8"},
139142
{PG_ISO_8859_8, "iso88598"},
140143

144+
{PG_SJIS, "SJIS"},
145+
{PG_SJIS, "PCK"},
146+
147+
{PG_BIG5, "BIG5"},
148+
{PG_BIG5, "BIG5HKSCS"},
149+
150+
{PG_GBK, "GBK"},
151+
152+
{PG_UHC, "UHC"},
153+
154+
{PG_JOHAB, "JOHAB"},
155+
156+
{PG_GB18030, "GB18030"},
157+
158+
{PG_SHIFT_JIS_2004, "SJIS_2004"},
159+
141160
{PG_SQL_ASCII, NULL} /* end marker */
142161
};
143162

0 commit comments

Comments
 (0)