Re: contrib/fixchar (Was: Large databases, performance) - Mailing list pgsql-hackers

From Tom Lane
Subject Re: contrib/fixchar (Was: Large databases, performance)
Date
Msg-id 9272.1034396414@sss.pgh.pa.us
Whole thread Raw
In response to Re: contrib/fixchar (Was: Large databases, performance)  (Giles Lean <giles@nemeton.com.au>)
List pgsql-hackers
Giles Lean <giles@nemeton.com.au> writes:
> Portable code uses 'unsigned char' when using ctype.h features, even
> though for many platforms where 'char' is an unsigned type it's not
> necessary for correct functioning.

Yup.  Awhile back I went through the PG sources and made sure we
explicitly casted the arguments of ctype.h functions to "unsigned char"
if they weren't already.  If anyone sees a place I missed (or that
snuck in later) please speak up!

> I don't see any isspace() or similar in the code though, so I'm not
> sure why this issue is being raised?

Ditto, I saw no ctype.h usage in Manfred's code.  It matters not whether
you label strcmp's argument as unsigned...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Re: MySQL vs PostgreSQL.
Next
From: "Shridhar Daithankar"
Date:
Subject: Re: contrib/fixchar (Was: Large databases, performance)