Commit Graph

21 Commits

Author SHA1 Message Date
Bruce Momjian 2432d10bf2 Fix pg_get_encoding_from_locale() function call parameters to match
prototype for cases where there is no multi-language support.
2011-02-10 15:39:41 -05:00
Peter Eisentraut 414c5a2ea6 Per-column collation support
This adds collation support for columns and domains, a COLLATE clause
to override it per expression, and B-tree index support.

Peter Eisentraut
reviewed by Pavel Stehule, Itagaki Takahiro, Robert Haas, Noah Misch
2011-02-08 23:04:18 +02:00
Bruce Momjian 5d950e3b0c Stamp copyrights for year 2011. 2011-01-01 13:18:15 -05:00
Magnus Hagander 9f2e211386 Remove cvs keywords from all files. 2010-09-20 22:08:53 +02:00
Itagaki Takahiro 72ee670323 Code page for EUC-KR is surely 51949. 2010-05-06 02:12:38 +00:00
Itagaki Takahiro 7780c4124b Add CP949 as an alias for UHC encoding. pg_get_encoding_from_locale()
with kor locale on Windows can use the path.

Reported by Hiroshi Inoue.
2010-04-28 00:29:16 +00:00
Bruce Momjian 65e806cba1 pgindent run for 9.0 2010-02-26 02:01:40 +00:00
Bruce Momjian 0239800893 Update copyright for the year 2010. 2010-01-02 16:58:17 +00:00
Tom Lane 8539a0e00a Check for C/POSIX before assuming that nl_langinfo or win32_langinfo
will work.  Per buildfarm results.
2009-11-12 03:37:15 +00:00
Tom Lane 8f8a5df694 Make initdb behave sanely when the selected locale has codeset "US-ASCII".
Per discussion, this should result in defaulting to SQL_ASCII encoding.
The original coding could not support that because it conflated selection
of SQL_ASCII encoding with not being able to determine the encoding.
Adjust pg_get_encoding_from_locale()'s API to distinguish these cases,
and fix callers appropriately.  Only initdb actually changes behavior,
since the other callers were perfectly content to consider these cases
equivalent.

Per bug #5178 from Boh Yap.  Not going to bother back-patching, since
no one has complained before and there's an easy workaround (namely,
specify the encoding you want).
2009-11-12 02:46:16 +00:00
Peter Eisentraut 8b9dd6b5fd Support for KOI8U encoding 2009-02-10 19:29:39 +00:00
Bruce Momjian 511db38ace Update copyright for 2009. 2009-01-01 17:24:05 +00:00
Bruce Momjian 9098ab9e32 Update copyrights in source tree to 2008. 2008-01-01 19:46:01 +00:00
Bruce Momjian fdf5a5efb7 pgindent run for 8.3. 2007-11-15 21:14:46 +00:00
Alvaro Herrera f8c9ef9069 Add new encoding aliases for Solaris, per Zdenek Kotala. 2007-10-25 12:29:17 +00:00
Tom Lane 26cbf791ec Add missing entry for PG_WIN1250 encoding, per gripe from Pavel Stehule.
Also enable translation of PG_WIN874, which certainly seems to have an
obvious translation now, though maybe it did not at the time this table's
ancestor was created.
2007-10-17 15:24:04 +00:00
Magnus Hagander fb074439ae Add missing codepage numbers for Windows.
Dave Page
2007-10-10 11:50:07 +00:00
Tom Lane a8dfe119bd Teach chklocale.c how to extract encoding info from Windows locale
names.  ITAGAKI Takahiro
2007-10-03 17:16:39 +00:00
Tom Lane d5459671a3 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 ...
2007-09-29 00:01:43 +00:00
Tom Lane 1f32999039 On OS X, assume that an empty-string result for nl_langinfo(CODESET)
means UTF-8.  Per examination of /usr/share/locale in 10.4.10.
2007-09-28 23:36:06 +00:00
Tom Lane 70b9b9b788 Change initdb and CREATE DATABASE to actively reject attempts to create
databases with encodings that are incompatible with the server's LC_CTYPE
locale, when we can determine that (which we can on most modern platforms,
I believe).  C/POSIX locale is compatible with all encodings, of course,
so there is still some usefulness to CREATE DATABASE's ENCODING option,
but this will insulate us against all sorts of recurring complaints
caused by mismatched settings.

I moved initdb's existing LC_CTYPE-to-encoding mapping knowledge into
a new src/port/ file so it could be shared by CREATE DATABASE.
2007-09-28 22:25:49 +00:00