Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e7fe89d

Browse files
committed
This makes the initcap function compatible with Oracle 9i, it has been
tested on both redhat 8 and FreebSD. -- Mike Nolan
1 parent 1e5a16c commit e7fe89d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/backend/utils/adt/oracle_compat.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oracle_compat.c,v 1.44 2003/05/23 22:33:20 tgl Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/oracle_compat.c,v 1.45 2003/07/27 03:16:20 momjian Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -132,7 +132,8 @@ initcap(PG_FUNCTION_ARGS)
132132

133133
while (m-- > 0)
134134
{
135-
if (isspace((unsigned char) ptr[-1]))
135+
/* Oracle capitalizes after all non-alphanumeric */
136+
if (!isalnum((unsigned char) ptr[-1]))
136137
*ptr = toupper((unsigned char) *ptr);
137138
else
138139
*ptr = tolower((unsigned char) *ptr);

0 commit comments

Comments
 (0)