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 92B1B9FB1BC for ; Wed, 21 Jun 2006 16:55:48 -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 44628-03 for ; Wed, 21 Jun 2006 16:55:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from net2.micro-automation.com (net2.micro-automation.com [64.7.141.29]) by postgresql.org (Postfix) with SMTP id 579AB9F9CC1 for ; Wed, 21 Jun 2006 16:55:43 -0300 (ADT) Received: (qmail 16008 invoked from network); 21 Jun 2006 19:55:42 -0000 Received: from dcdsl.ebox.com (HELO ?192.168.1.2?) (davec@64.7.143.116) by net2.micro-automation.com with SMTP; 21 Jun 2006 19:55:42 -0000 In-Reply-To: <30b57570606211026o66e337c9s658387db0b32aeed@mail.gmail.com> References: <30b57570606211026o66e337c9s658387db0b32aeed@mail.gmail.com> Mime-Version: 1.0 (Apple Message framework v750) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <0762B528-6ACC-4E9D-8C48-75AF931234D4@fastcrypt.com> Cc: pgsql-jdbc@postgresql.org Content-Transfer-Encoding: 7bit From: Dave Cramer Subject: Re: Binary tx format for an array? Date: Wed, 21 Jun 2006 15:55:41 -0400 To: Michael Guyver X-Mailer: Apple Mail (2.750) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/77 X-Sequence-Number: 15357 My guess is that it depends on the machine it is on. Dave On 21-Jun-06, at 1:26 PM, Michael Guyver wrote: > 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 > > ---------------------------(end of > broadcast)--------------------------- > TIP 6: explain analyze is your friend >