Re: DataRow Null values Frontend/Backend Protocol TCP/IP

Поиск
Список
Период
Сортировка
От Raimon Fernandez
Тема Re: DataRow Null values Frontend/Backend Protocol TCP/IP
Дата
Msg-id 19995F75-01AD-41D9-BCAE-7C201635FCC5@montx.com
обсуждение исходный текст
Ответ на Re: DataRow Null values Frontend/Backend Protocol TCP/IP  (Craig Ringer <craig@postnewspapers.com.au>)
Список pgsql-general
On 02/11/2009, at 10:37, Craig Ringer wrote:

> On 2/11/2009 5:21 PM, Raimon Fernandez wrote:
>> Here I'm again ...
>>
>>
>> I'm parsing the DataRow(B), and I'm having problems with NULL values.
>>
>> In the docs I can read they have a -1 value, an no bytes follow
>> them for
>> the value.
>>
>> But I'm getting a 1020 value instead of -1
>
> You're using RealBasic or something, right?
>
> If so, you're probably doing something funky with signed/unsigned
> integer handling and the representation of integers.
>
> -1 is 0xffffffff as a _signed_ 32 bit integer, same in little-endian
> or
> big-endian form. The same hex value as an unsigned integer is
> 4294967295 .
>
> ...
>
> I don't know where you're getting the 1020, but 4294967295 is
> MAXUINT32
> and suggests you're treating the data as an unsigned rather than a
> signed 32 bit integer.

yes, you're right, I had and old legacy code that was processing
incorrectly the received data as string directly than getting the
binary ...

what I see that it was working all the time, except the -1 ...


now it returns -1 ...

thanks !

refards,


raimon



В списке pgsql-general по дате отправления:

Предыдущее
От: Raimon Fernandez
Дата:
Сообщение: Re: Cancelling Requests Frontend/Backend Protocol TCP/IP
Следующее
От: Alban Hertroys
Дата:
Сообщение: Re: DataRow Null values Frontend/Backend Protocol TCP/IP