Re: Receiving data in binary format how is it encoded? - Mailing list pgsql-hackers

From Carlos Guzman Alvarez
Subject Re: Receiving data in binary format how is it encoded?
Date
Msg-id 3F086B72.4070304@telefonica.net
Whole thread Raw
In response to Re: Receiving data in binary format how is it encoded?  ("Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>)
Responses Re: Receiving data in binary format how is it encoded?  ("Francisco Figueiredo Jr." <fxjrlists@yahoo.com.br>)
List pgsql-hackers
Hello:

> Yeah, while waiting for the response, I added support for the int4 
> datatype. It is really encoded as a 4 bytes value.

:)

> Uhmmm, where did you take the 2000,1,1 as base from?
> If the date is before 2000, days will have a negative value, so date is 
> calculated correctly backwards?

In the little tests i do, yes.


> Thanks Carlos. do you know in what file are these values produced?

Not sure but i'm reviewing files in directory:

src\backend\utils\adt

This is what seems to be sent for numeric datatype i'm going to test it 
now :D:
pq_sendint(&buf, x.ndigits, sizeof(int16));pq_sendint(&buf, x.weight, sizeof(int16));pq_sendint(&buf, x.sign,
sizeof(int16));pq_sendint(&buf,x.dscale, sizeof(int16));for (i = 0; i < x.ndigits; i++)    pq_sendint(&buf,
x.digits[i],sizeof(NumericDigit));
 






-- 
Best regards

Carlos Guzmán Álvarez
Vigo-Spain



pgsql-hackers by date:

Previous
From: Kurt Roeckx
Date:
Subject: Re: PostgreSQL 7.4devel - LOG: PGSTAT: socket() failed: Invalid argument
Next
From: Sergey
Date:
Subject: Re: PostgreSQL 7.3.3 and Intel C compiler