Re: Implementing Frontend/Backend Protocol TCP/IP - Mailing list pgsql-general

From Raimon Fernandez
Subject Re: Implementing Frontend/Backend Protocol TCP/IP
Date
Msg-id 4AB34FE9-CC23-48BE-B905-6478304E0E5B@montx.com
Whole thread Raw
In response to Re: Implementing Frontend/Backend Protocol TCP/IP  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: Implementing Frontend/Backend Protocol TCP/IP
List pgsql-general
On 27/10/2009, at 14:41, Alvaro Herrera wrote:

> Raimon Fernandez wrote:
>
>> After the S I found thre char(0) and later the size of the packet,
>> and later the name + char(0) (separator between value and
>> parameter), the parameter, and so on.
>>
>> Why I found those three char(0) after the S and before the packet
>> length?
>
> Because the length is an int32.  There are 3 zeros because the packet
> length is less than 256.

here is where I'm doing a bad parsing.

how I know where the length ends ?

I know it starts after the S, and for the parsing that I have, always
the length is 4 chars.

I have to evaluate one by one ?

thanks,

r.


> --
> Alvaro Herrera                                http://www.CommandPrompt.com/
> PostgreSQL Replication, Consulting, Custom Development, 24x7 support
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general
>



pgsql-general by date:

Previous
From: Joshua Berry
Date:
Subject: Upgrade from 8.2 to 8.3 & catching errors in functions
Next
From: Kynn Jones
Date:
Subject: Re: Why does pg_dump set default_with_oids to true?