Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id DA009632CDA for ; Tue, 7 Apr 2009 12:17:30 -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 54128-06 for ; Tue, 7 Apr 2009 12:17:29 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24]) by mail.postgresql.org (Postfix) with ESMTP id 1DC4E633B8D for ; Tue, 7 Apr 2009 12:17:29 -0300 (ADT) Received: by qw-out-2122.google.com with SMTP id 8so1909189qwh.61 for ; Tue, 07 Apr 2009 08:17:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type; bh=ml+6j0i/3ndGtcflT6C370ht5n+NEUdR64OxRZVzraA=; b=QrQq5wniOh0wL1SrqGZ83wDSmDSsFSMaBZ/qgvUwpD50TN+e3c1x7AYBzv+4kXVfOo 80hWyiX2KPnT+5V8QZZDrgkkHQuPQqgmtpC+pRJilBsYgUYUv9TSa0siGDejmFSVMhBt QgtjbB0eezEXp1gVPpnKLUDzIc8cAYv7MT2No= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=lEdZXz1yWOOcFAvKWX0MKcxaJ/Au3xdASXNpuVwKIojQ86suwEO1gAjV7JhAzapJKw A0/Uprr4ObNxysQQHTAJkYxuynRM+rDfK6HKubMoykS0bY2Q/LLZcEgnrYVXwAe+SnDJ DVg3keQ+Otd1upEFA0nyLGzBGb5BZTbxOfUho= MIME-Version: 1.0 Received: by 10.229.96.13 with SMTP id f13mr124300qcn.36.1239117447333; Tue, 07 Apr 2009 08:17:27 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 Apr 2009 11:17:27 -0400 X-Google-Sender-Auth: f145f900771e311b Message-ID: <491f66a50904070817o3af217d4odc32bdfd29b47789@mail.gmail.com> Subject: Re: Array passing From: Dave Cramer To: John Lister Cc: pgsql-jdbc@postgresql.org Content-Type: multipart/alternative; boundary=00163683248248f07f0466f88301 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200904/21 X-Sequence-Number: 19468 --00163683248248f07f0466f88301 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Tue, Apr 7, 2009 at 10:24 AM, John Lister wrote: > Hi, i've been playing with arrays using the 604 version JDBC 4 driver and > i have a question. They seem to be converted to strings which are passed > back and forth to the server. > > Is it possible to configure the driver to pass the arrays in native form? > The overhead of converting to strings is quite big in my case (both in the > size of the string and the time taken) so would like to eliminate it if > possible... > > Which leads onto, does the postgresql protocol support native arrays? i'm > trying to find docs about the datatypes but would hope it did... > Yes, it does, but there are platform specific binary representations of native types. For instance you can have floating point or integer datetimes. There was some work done on supporting binary protocol at one point, not sure where it stands now. Dave --00163683248248f07f0466f88301 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

On Tue, Apr 7, 2009 at 10:24 AM, John Li= ster <= john.lister-ps@kickstone.com> wrote:
Hi, i've been playing with arrays = using the 604=20 version JDBC 4 driver and i have a question. They seem to be converted to= =20 strings which are passed back and forth to the server.
=A0
Is it possible to configure the driver= to pass the=20 arrays in native form? The overhead of converting to strings is quite big i= n my=20 case (both in the size of the string and the time taken) so would like to= =20 eliminate it if possible...
=A0
Which leads onto, does the postgresql = protocol=20 support native arrays? i'm trying to find docs about the datatypes but = would=20 hope it did...
=A0
Yes, it do= es, but there are platform specific binary representations of native types.= For instance you can have floating point or integer datetimes.

Ther= e was some work done on supporting binary protocol at one point, not sure w= here it stands now.

Dave
--00163683248248f07f0466f88301--