summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane2007-09-29 00:01:43 +0000
committerTom Lane2007-09-29 00:01:43 +0000
commitd5459671a33c6a663c0912691f731f2059eee315 (patch)
treedfc1b48b8a525347505aff8001ae5fecc65c4eed /src
parent1f329990398765741c803632e6f4bc5a0a0b634d (diff)
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 ...
Diffstat (limited to 'src')
-rw-r--r--src/port/chklocale.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/port/chklocale.c b/src/port/chklocale.c
index 955437f2c1..6e78b847a3 100644
--- a/src/port/chklocale.c
+++ b/src/port/chklocale.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/port/chklocale.c,v 1.2 2007/09/28 23:36:06 tgl Exp $
+ * $PostgreSQL: pgsql/src/port/chklocale.c,v 1.3 2007/09/29 00:01:43 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -31,7 +31,10 @@
/*
* This table needs to recognize all the CODESET spellings for supported
- * backend encodings. We don't need to handle frontend-only encodings.
+ * backend encodings, as well as frontend-only encodings where possible
+ * (the latter case is currently only needed for initdb to recognize
+ * error situations).
+ *
* Note that we search the table with pg_strcasecmp(), so variant
* capitalizations don't need their own entries.
*/
@@ -138,6 +141,22 @@ static const struct encoding_match encoding_match_list[] = {
{PG_ISO_8859_8, "ISO8859-8"},
{PG_ISO_8859_8, "iso88598"},
+ {PG_SJIS, "SJIS"},
+ {PG_SJIS, "PCK"},
+
+ {PG_BIG5, "BIG5"},
+ {PG_BIG5, "BIG5HKSCS"},
+
+ {PG_GBK, "GBK"},
+
+ {PG_UHC, "UHC"},
+
+ {PG_JOHAB, "JOHAB"},
+
+ {PG_GB18030, "GB18030"},
+
+ {PG_SHIFT_JIS_2004, "SJIS_2004"},
+
{PG_SQL_ASCII, NULL} /* end marker */
};