Re: patch: ResultSetTest.java

Поиск
Список
Период
Сортировка
От Oliver Jowett
Тема Re: patch: ResultSetTest.java
Дата
Msg-id 435E9C84.40300@opencloud.com
обсуждение исходный текст
Ответ на Re: patch: ResultSetTest.java  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-jdbc
Tom Lane wrote:
> Oliver Jowett <oliver@opencloud.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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: patch: ResultSetTest.java
Следующее
От: andy petrella
Дата:
Сообщение: largeobjects deadlock ?