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 2C3839FA430 for ; Thu, 22 Jun 2006 05:16:43 -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 36361-10 for ; Thu, 22 Jun 2006 05:16:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from wx-out-0102.google.com (wx-out-0102.google.com [66.249.82.207]) by postgresql.org (Postfix) with ESMTP id 71F379FA60C for ; Thu, 22 Jun 2006 05:16:34 -0300 (ADT) Received: by wx-out-0102.google.com with SMTP id s13so271485wxc for ; Thu, 22 Jun 2006 01:16:32 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=googlemail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=DwxqfD87FkVKI1TNkYRE0hu/JFnjvmdd0I6dOwgKkfeTM28x8N1LNZ1TL0NS5DFcBE/aYHfIvACLidkFOdtCMy92UAA8X8Pb7sfERlKvOh0KaBbqO2GOjDp6V6RgwF5Mlp7L3/bdvqxVRXwlbw5CljQ8h0id68HjdT2YrjG/mjc= Received: by 10.70.65.10 with SMTP id n10mr2667810wxa; Thu, 22 Jun 2006 01:16:32 -0700 (PDT) Received: by 10.70.78.16 with HTTP; Thu, 22 Jun 2006 01:16:32 -0700 (PDT) Message-ID: <30b57570606220116h2f216c1eue74e5cfbb41bd5bc@mail.gmail.com> Date: Thu, 22 Jun 2006 09:16:32 +0100 From: "Michael Guyver" To: pgsql-jdbc@postgresql.org Subject: Re: Binary tx format for an array? In-Reply-To: <17160.1150929667@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <30b57570606211026o66e337c9s658387db0b32aeed@mail.gmail.com> <17160.1150929667@sss.pgh.pa.us> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/89 X-Sequence-Number: 15369 Thanks very much for your prompt help on this lads. > sizeof(Oid) is 4 [bytes]. You can check this and other basic datatype > sizes by looking in pg_type. So in the following code StringInfo buf = (StringInfo) PG_GETARG_POINTER(0) // ... Oid element_type = pq_getmsgint(buf, sizeof(Oid)); are the bytes representing an int4 Oid simply 23, represented in variable buf as [0x17][0x00][0x00][0x00] The reason for asking is I'm under the impression there can be differences between network byte-order and other representations. Hopefully this isn't an inane question - apologies if it is. Regards, Michael