patch for Oracle initcap compatibility

From: nolan(at)celery(dot)tssi(dot)com
To: pgsql-patches(at)postgresql(dot)org (pgsql patch list)
Subject: patch for Oracle initcap compatibility
Date: 2003-07-17 08:08:14
Message-ID: 20030717080815.29414.qmail@celery.tssi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

This makes the initcap function compatible with Oracle 9i, it has been
tested on both redhat 8 and FreebSD.
--
Mike Nolan

RCS file: /projects/cvsroot/pgsql-server/src/backend/utils/adt/oracle_compat.c,v
retrieving revision 1.44
diff -c -r1.44 oracle_compat.c
*** oracle_compat.c 23 May 2003 22:33:20 -0000 1.44
--- oracle_compat.c 17 Jul 2003 08:03:41 -0000
***************
*** 132,138 ****

while (m-- > 0)
{
! if (isspace((unsigned char) ptr[-1]))
*ptr = toupper((unsigned char) *ptr);
else
*ptr = tolower((unsigned char) *ptr);
--- 132,139 ----

while (m-- > 0)
{
! /* Oracle capitalizes after all non-alphanumeric */
! if (!isalnum((unsigned char) ptr[-1]))
*ptr = toupper((unsigned char) *ptr);
else
*ptr = tolower((unsigned char) *ptr);

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2003-07-17 08:16:47 Re: Release.sgml markup
Previous Message Larry Rosenman 2003-07-15 20:28:10 Re: PERL (fwd)