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