X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id CA40ADADD2 for ; Tue, 25 Oct 2005 17:58:47 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 20580-05 for ; Tue, 25 Oct 2005 20:58:44 +0000 (GMT) Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by svr1.postgresql.org (Postfix) with ESMTP id C0B10DACFD for ; Tue, 25 Oct 2005 17:58:45 -0300 (ADT) Received: from 203-79-104-60.cable.paradise.net.nz ([203.79.104.60] helo=[192.168.0.20]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1EUVsb-00043P-M4; Wed, 26 Oct 2005 09:58:45 +1300 Message-ID: <435E9C84.40300@opencloud.com> Date: Wed, 26 Oct 2005 09:58:44 +1300 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051009) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Tom Lane Cc: Ken Geis , pgsql-jdbc@postgresql.org Subject: Re: patch: ResultSetTest.java References: <13234.1130247178@sss.pgh.pa.us> <5de916660e000c9b77ae3ec5e213b0a9@speakeasy.net> <14102.1130252457@sss.pgh.pa.us> <435E9821.5060704@opencloud.com> <28994.1130273364@sss.pgh.pa.us> In-Reply-To: <28994.1130273364@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.008 required=5 tests=[AWL=0.008] X-Spam-Level: X-Archive-Number: 200510/132 X-Sequence-Number: 14063 Tom Lane wrote: > Oliver Jowett writes: > >>Or perhaps something like using the input/output functions if >>send/receive are not present? > > Doesn't seem like an amazingly good idea ... how would you know what you > were getting? Err, the same question applies to any binary data type, surely. You have to know what format the data is in to make use of it. The issue is that getting an ERROR in this case makes the binary output formats somewhat useless.. I was thinking of it as "if you do not specify send/receive functions, then the 'binary' format is the same as the text format". Is that unreasonable to do? > A more salient point is exactly what is JDBC going to *do* with data in > an unknown binary format? Well, my plan back when I looked at this last was to just store the binary-format data on the client side, and if the application actually asked for it in text format (directly or implicitly), send it back to the backend as a binary-format parameter to a SELECT that returns a text-format column (i.e. ask the backend to do the work of turning it into text, since the driver doesn't know how to). That would work fine except for this ERROR case. -O