Skip site navigation (1) Skip section navigation (2)

Re: Proposed patch to clean up signed-ness warnings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp>
Cc: t-ishii(at)sra(dot)co(dot)jp, pgsql-patches(at)postgreSQL(dot)org,pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: Proposed patch to clean up signed-ness warnings
Date: 2005-09-22 23:46:04
Message-ID: 18088.1127432764@sss.pgh.pa.us (view raw, whole thread or download thread mbox)
Thread:
Lists: pgsql-hackerspgsql-patches
Tatsuo Ishii <ishii(at)sraoss(dot)co(dot)jp> writes:
>> 1. Can anyone think of a cleaner way to do this?

> For me, your patche seems to be a retrogression. In my understanding,
> the reason why PostgreSQL uses "char *" in many places is just it was
> designed in the old days when ASCII was the only charset in the world.

Are you proposing that we change all the "char *" to "unsigned char *"?
I looked at that briefly but it seems like a huge loss, both in
notational ugliness and in the amount of code that would have to be
touched.  Also, it would force us to add a bunch of explicit casts to
avoid warnings with standard library functions like strlen().  To me the
bottom line is that 99% of the code only needs to know that a character
string is a character string.  As this patch demonstrates, there is only
a tiny fraction that needs to have the "unsigned" declaration.  I don't
think we should allow that fraction to dictate a notational burden for
all the rest.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2005-09-22 23:49:14
Subject: Re: Table Partitioning is in 8.1
Previous:From: Trent ShipleyDate: 2005-09-22 23:34:16
Subject: Re: R: feature proposal ...

pgsql-patches by date

Next:From: Bruce MomjianDate: 2005-09-22 23:57:35
Subject: Re: [PATCHES] Caveat for Domains
Previous:From: Tatsuo IshiiDate: 2005-09-22 23:13:10
Subject: Re: Proposed patch to clean up signed-ness warnings

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group