projects
/
users
/
bernd
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
75ff55f
)
This makes the initcap function compatible with Oracle 9i, it has been
author
Bruce Momjian
<
[email protected]
>
Sun, 27 Jul 2003 03:16:20 +0000
(
03:16
+0000)
committer
Bruce Momjian
<
[email protected]
>
Sun, 27 Jul 2003 03:16:20 +0000
(
03:16
+0000)
tested on both redhat 8 and FreebSD.
--
Mike Nolan
src/backend/utils/adt/oracle_compat.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/oracle_compat.c
b/src/backend/utils/adt/oracle_compat.c
index a1a6a1954384edb1ed469ecacfce34987b542dad..441caff0410e8ff9118fd59263d2c98ee906e740 100644
(file)
--- 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);