Re: unsigned and signed chars in libpq API - Mailing list pgsql-hackers

From Tom Lane
Subject Re: unsigned and signed chars in libpq API
Date
Msg-id 3517.1346085637@sss.pgh.pa.us
Whole thread Raw
In response to Re: unsigned and signed chars in libpq API  (Bruce Momjian <bruce@momjian.us>)
Responses Re: unsigned and signed chars in libpq API
List pgsql-hackers
Bruce Momjian <bruce@momjian.us> writes:
> On Thu, Feb  2, 2012 at 10:33:24AM +0300, Dmitriy Igrishin wrote:
>> Could you tell me please an objective reason why PQunescapeBytea()
>> returns unsigned char* rather than just char* ?
>> I am asking because a bit confused. How this intermixes with LO's API,
>> which based on signed chars (although as we all know large object -
>> is a just bytea splitted on chunks)?
>> And also PQgetvalue() returns char* rather than unsigned char*.

> Can someone answer this?  Are we consistent here?

We're not, particularly, but changing any of this seems likely to
create more pain than it removes.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Timing overhead and Linux clock sources
Next
From: Fujii Masao
Date:
Subject: Useless removal of duplicate GIN index entries in pg_trgm