X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 594AB9F9CC1 for ; Wed, 21 Jun 2006 14:33:08 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 26169-04 for ; Wed, 21 Jun 2006 14:33:03 -0300 (ADT) X-Greylist: delayed 00:06:28.501411 by SQLgrey- Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.200]) by postgresql.org (Postfix) with ESMTP id 195F19FA65C for ; Wed, 21 Jun 2006 14:33:02 -0300 (ADT) Received: by wx-out-0102.google.com with SMTP id s13so155477wxc for ; Wed, 21 Jun 2006 10:33:02 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=Re+lml68aS9djOWeNgV7vH5d2R4xRR3kk48NVmx1eOi63QNnbHKrTvB8Gx00c3u1c7VSvj9uquvexPCH2j81xsY4EAlQ/VUBySdkKxKFjTiEyKdFjP/M5z+ONAeqF6zZeSQU97LvqdRCvCwTAzkopfdmHeuPkia+3qL8NGGlZFE= Received: by 10.70.62.20 with SMTP id k20mr1444623wxa; Wed, 21 Jun 2006 10:26:33 -0700 (PDT) Received: by 10.70.78.16 with HTTP; Wed, 21 Jun 2006 10:26:33 -0700 (PDT) Message-ID: <30b57570606211026o66e337c9s658387db0b32aeed@mail.gmail.com> Date: Wed, 21 Jun 2006 18:26:33 +0100 From: "Michael Guyver" To: pgsql-jdbc@postgresql.org Subject: Binary tx format for an array? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/75 X-Sequence-Number: 15355 Hi there, My question relates to trying to implement the binary transmission protocol for an Array type. I understand that the only place the format is documented is in the Postgres C source code. I've had a look through it and it seems comprehensible enough (to a non-C programmer), but I was wondering how the following expression would evaluate: // arrayfuncs.c, in array_recv element_type = pq_getmsgint(buf, sizeof(Oid)); or more specifically, the int size = sizeof(Oid); expression. Knowing this value would mean knowing how many bytes describing the Oid to transmit. Cheers Michael