Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B9665633FDB for ; Tue, 7 Apr 2009 16:35:21 -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 11434-03 for ; Tue, 7 Apr 2009 16:35:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kickstone.com (smtp.kickstone.com [87.194.183.70]) by mail.postgresql.org (Postfix) with ESMTP id 76340633E5D for ; Tue, 7 Apr 2009 16:35:08 -0300 (ADT) Received: from madras2.square-pi.com ([192.168.2.131]:2892 helo=MADRAS2) by mail.kickstone.com with esmtpa (Exim 4.69) (envelope-from ) id 1LrH4d-0002f0-3y; Tue, 07 Apr 2009 20:35:07 +0100 Message-ID: From: "John Lister" To: "Andrew Chernow" Cc: References: <89DBB5874E89413698A8E275E5E79154@squarepi.com> <49DBA65B.9020706@esilo.com> Subject: Re: Array types Date: Tue, 7 Apr 2009 20:35:07 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="utf-8"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5512 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=AWL=0.001 X-Spam-Level: X-Archive-Number: 200904/378 X-Sequence-Number: 136481 Does libpqtypes pass the array "over the wire" as an array? Ideally i'd like to do this with jdbc, but might give me a pointer... Thanks ----- Original Message ----- From: "Andrew Chernow" To: "John Lister" Cc: Sent: Tuesday, April 07, 2009 8:15 PM Subject: Re: [HACKERS] Array types > John Lister wrote: >> They all return arrays as text, is it possible to configure postgresql to >> return an array in native form (does postgresql support such a thing)? >> This is using both the simple and extended query forms - i couldn't see a >> way to say what return type i wanted in the protocol docs... >> > > You need libpqtypes (client-side library). It requires a new 8.4 feature > called libpq-events, but there is an 8.3 patch available. If you willing > to patch your 8.3.5 libpq client, than this should meet your needs. > > Downloads: http://pgfoundry.org/projects/libpqtypes/ > Documentation: http://libpqtypes.esilo.com/ > > For arrays, libpqtypes gives you a PGresult where each tuple is an array > item. For composite arrays, each composite field is a PGresult field. > >> This would seem much better in terms of performance, both size and >> speed(conversion). >> > > That is true. Our testing has proven this. It also reduces the overall > coding effort. > > -- > Andrew Chernow > eSilo, LLC > every bit counts > http://www.esilo.com/ >