OSDN Git Service

Solve the 'Turkish problem' with undesirable locale behavior for case
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 May 2004 00:24:59 +0000 (00:24 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 7 May 2004 00:24:59 +0000 (00:24 +0000)
commit0bd61548ab8d1ac5fee63f48ee9b384502a51ad6
treeb0c63b75585d0c396e67a3acd204e226b13eae4b
parent4d46274b33db52618ccf49550213b4d5ce4a7981
Solve the 'Turkish problem' with undesirable locale behavior for case
conversion of basic ASCII letters.  Remove all uses of strcasecmp and
strncasecmp in favor of new functions pg_strcasecmp and pg_strncasecmp;
remove most but not all direct uses of toupper and tolower in favor of
pg_toupper and pg_tolower.  These functions use the same notions of
case folding already developed for identifier case conversion.  I left
the straight locale-based folding in place for situations where we are
just manipulating user data and not trying to match it to built-in
strings --- for example, the SQL upper() function is still locale
dependent.  Perhaps this will prove not to be what's wanted, but at
the moment we can initdb and pass regression tests in Turkish locale.
67 files changed:
configure
configure.in
contrib/ltree/lquery_op.c
contrib/ltree/ltxtquery_op.c
contrib/pgcrypto/internal.c
contrib/pgcrypto/md5.c
contrib/pgcrypto/mhash.c
contrib/pgcrypto/pgcrypto.c
contrib/pgcrypto/px-crypt.c
contrib/pgcrypto/px.c
contrib/pgcrypto/sha1.c
contrib/spi/timetravel.c
contrib/tsearch2/dict_ispell.c
contrib/tsearch2/ispell/spell.c
contrib/tsearch2/wparser_def.c
src/Makefile.global.in
src/backend/access/transam/xlog.c
src/backend/commands/aggregatecmds.c
src/backend/commands/define.c
src/backend/commands/functioncmds.c
src/backend/commands/operatorcmds.c
src/backend/commands/tablecmds.c
src/backend/commands/typecmds.c
src/backend/commands/variable.c
src/backend/regex/regc_locale.c
src/backend/regex/regcomp.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/bool.c
src/backend/utils/adt/cash.c
src/backend/utils/adt/date.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/encode.c
src/backend/utils/adt/float.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/numeric.c
src/backend/utils/adt/regexp.c
src/backend/utils/adt/regproc.c
src/backend/utils/adt/tid.c
src/backend/utils/adt/timestamp.c
src/backend/utils/error/elog.c
src/backend/utils/misc/guc.c
src/bin/pg_dump/pg_backup_tar.c
src/bin/psql/command.c
src/bin/psql/common.c
src/bin/psql/copy.c
src/bin/psql/describe.c
src/bin/psql/help.c
src/bin/psql/psqlscan.l
src/bin/psql/tab-complete.c
src/include/c.h
src/include/pg_config.h.in
src/include/port.h
src/include/port/qnx4.h
src/include/port/ultrix4.h
src/include/regex/regcustom.h
src/interfaces/ecpg/pgtypeslib/datetime.c
src/interfaces/ecpg/pgtypeslib/dt_common.c
src/interfaces/ecpg/preproc/preproc.y
src/interfaces/libpq/Makefile
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-protocol2.c
src/interfaces/libpq/fe-protocol3.c
src/interfaces/libpq/fe-secure.c
src/interfaces/libpq/win32.h
src/pl/plpython/plpython.c
src/port/pgstrcasecmp.c [new file with mode: 0644]
src/port/strcasecmp.c [deleted file]