Re: patch: ResultSetTest.java

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Ken Geis <kgeis(at)speakeasy(dot)net>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: patch: ResultSetTest.java
Date: 2005-10-25 20:58:44
Message-ID: 435E9C84.40300@opencloud.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Tom Lane wrote:
> Oliver Jowett <oliver(at)opencloud(dot)com> 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

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message andy petrella 2005-10-25 23:49:41 largeobjects deadlock ?
Previous Message Tom Lane 2005-10-25 20:49:24 Re: patch: ResultSetTest.java