diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-05-07 00:24:59 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-05-07 00:24:59 +0000 |
commit | 0bd61548ab8d1ac5fee63f48ee9b384502a51ad6 (patch) | |
tree | b0c63b75585d0c396e67a3acd204e226b13eae4b /src/backend/access/transam/xlog.c | |
parent | 4d46274b33db52618ccf49550213b4d5ce4a7981 (diff) | |
download | postgresql-0bd61548ab8d1ac5fee63f48ee9b384502a51ad6.tar.gz postgresql-0bd61548ab8d1ac5fee63f48ee9b384502a51ad6.zip |
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.
Diffstat (limited to 'src/backend/access/transam/xlog.c')
-rw-r--r-- | src/backend/access/transam/xlog.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/access/transam/xlog.c b/src/backend/access/transam/xlog.c index 6a1ccef8ec5..b6199706f67 100644 --- a/src/backend/access/transam/xlog.c +++ b/src/backend/access/transam/xlog.c @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.139 2004/04/19 17:42:57 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/transam/xlog.c,v 1.140 2004/05/07 00:24:57 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -3778,27 +3778,27 @@ assign_xlog_sync_method(const char *method, bool doit, GucSource source) int new_sync_method; int new_sync_bit; - if (strcasecmp(method, "fsync") == 0) + if (pg_strcasecmp(method, "fsync") == 0) { new_sync_method = SYNC_METHOD_FSYNC; new_sync_bit = 0; } #ifdef HAVE_FDATASYNC - else if (strcasecmp(method, "fdatasync") == 0) + else if (pg_strcasecmp(method, "fdatasync") == 0) { new_sync_method = SYNC_METHOD_FDATASYNC; new_sync_bit = 0; } #endif #ifdef OPEN_SYNC_FLAG - else if (strcasecmp(method, "open_sync") == 0) + else if (pg_strcasecmp(method, "open_sync") == 0) { new_sync_method = SYNC_METHOD_OPEN; new_sync_bit = OPEN_SYNC_FLAG; } #endif #ifdef OPEN_DATASYNC_FLAG - else if (strcasecmp(method, "open_datasync") == 0) + else if (pg_strcasecmp(method, "open_datasync") == 0) { new_sync_method = SYNC_METHOD_OPEN; new_sync_bit = OPEN_DATASYNC_FLAG; |