From: Bruce Momjian Date: Sun, 27 Jul 2003 03:16:20 +0000 (+0000) Subject: This makes the initcap function compatible with Oracle 9i, it has been X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=39aa7fd13f09583a40be1df4569f1759f99a8522;p=users%2Fbernd%2Fpostgres.git This makes the initcap function compatible with Oracle 9i, it has been tested on both redhat 8 and FreebSD. -- Mike Nolan --- diff --git a/src/backend/utils/adt/oracle_compat.c b/src/backend/utils/adt/oracle_compat.c index a1a6a19543..441caff041 100644 --- a/src/backend/utils/adt/oracle_compat.c +++ b/src/backend/utils/adt/oracle_compat.c @@ -132,7 +132,8 @@ initcap(PG_FUNCTION_ARGS) while (m-- > 0) { - if (isspace((unsigned char) ptr[-1])) + /* Oracle capitalizes after all non-alphanumeric */ + if (!isalnum((unsigned char) ptr[-1])) *ptr = toupper((unsigned char) *ptr); else *ptr = tolower((unsigned char) *ptr);