Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 712F86326C2 for ; Tue, 27 Oct 2009 10:42:13 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 10349-08 for ; Tue, 27 Oct 2009 13:41:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from spinlock.commandprompt.com (host-215.commandprompt.net [207.173.203.215]) by mail.postgresql.org (Postfix) with ESMTP id CFFDF6336ED for ; Tue, 27 Oct 2009 10:42:02 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-87-11.bk6-dsl.surnet.cl [200.126.87.11]) by spinlock.commandprompt.com (Postfix) with ESMTPSA id 55B14348034; Tue, 27 Oct 2009 06:41:56 -0700 (PDT) Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id 4816F6E31F; Tue, 27 Oct 2009 10:41:58 -0300 (CLST) Date: Tue, 27 Oct 2009 10:41:58 -0300 From: Alvaro Herrera To: Raimon Fernandez Cc: pgsql-general@postgresql.org Subject: Re: Implementing Frontend/Backend Protocol TCP/IP Message-ID: <20091027134158.GB4876@alvh.no-ip.org> References: <92781008-8A70-42CE-A49B-6EE67103FACB@montx.com> <20091026231516.GN8812@alvh.no-ip.org> <4AE62E21.7040600@hogranch.com> <66F15D69-75E5-4D8E-84F8-2F21E09BBA98@pgedit.com> <9A9F2678-36B9-42A2-91B2-69076065E8EB@montx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9A9F2678-36B9-42A2-91B2-69076065E8EB@montx.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.571 tagged_above=-10 required=5 tests=AWL=0.028, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200910/1033 X-Sequence-Number: 154727 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. -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support