Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 0099A632A8B for ; Tue, 7 Apr 2009 23:16:51 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 74893-02 for ; Tue, 7 Apr 2009 23:16:49 -0300 (ADT) Received: from mx1.hub.org (mx1.hub.org [200.46.208.106]) by mail.postgresql.org (Postfix) with ESMTP id 98C52632A18 for ; Tue, 7 Apr 2009 23:16:49 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mx1.hub.org (Postfix) with ESMTP id 2D60A125A6C1 for ; Tue, 7 Apr 2009 23:16:49 -0300 (ADT) Received: by leary.csoft.net (Postfix, from userid 1112) id 63161AADD; Tue, 7 Apr 2009 22:16:46 -0400 (EDT) Date: Tue, 7 Apr 2009 22:16:46 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: John Lister cc: pgsql-jdbc@postgresql.org Subject: Re: Array passing In-Reply-To: <49DBBF8D.2080806@kickstone.com> Message-ID: References: <491f66a50904070817o3af217d4odc32bdfd29b47789@mail.gmail.com> <49DBBF8D.2080806@kickstone.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200904/28 X-Sequence-Number: 19475 On Tue, 7 Apr 2009, John Lister wrote: > Looking at the spec/docs although you can specify the return type in the > protocol there is no way to do it.. The only way i can see is to use a > stored procedure and specifying the return type there using > registerOutParameter(). However looking in the code > (SimpleParameterList) although the parameter is set to OUT, the return > type is ignored... > A parameter being in-vs-out is only relevent to function arguments being in or out, they have nothing to do with the format (text/binary) of the data, or even the direction data is traveling (from server/client). > Would setting the return type like this cause any problems? > If you could rig this up to set a flag indicating it should be binary, that wouldn't magically make everyone else respect it and do all the necessary conversions. You'd end up sending or receiving garbage data. The place to start is really with the existing binary transfer patches: http://archives.postgresql.org/pgsql-jdbc/2008-11/msg00000.php I've only looked at the patches to receive data in binary form, but there are also patches to send data in binary as well. Perhaps you can just apply them and all will be well, if not they're a good starting point and should at least demonstrate the scope of the problem (it's not just setting a flag). Kris Jurka