Re: Problem with fixed length fields. - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Problem with fixed length fields.
Date
Msg-id 27388.1098564647@sss.pgh.pa.us
Whole thread Raw
In response to Re: Problem with fixed length fields.  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Problem with fixed length fields.  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-jdbc
Oliver Jowett <oliver@opencloud.com> writes:
> Tom Lane wrote:
>> Can you refrain from assigning a type at all?

> Pushing on blindly with a Bind without knowing the actual type of the
> parameters you're sending seems possible but dangerous. It'd preclude
> using binary-format parameters for unknown types, at a minimum.

I had in mind doing this *only* for setString; you would essentially be
assuming that the resolved type was text, varchar, or char, which have
interchangeable binary formats.

It would probably be a good idea to do a Describe Statement to verify
that the parameter got resolved as one of those, but this need not add
a round-trip, since you could issue it with the Parse message.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Problem with fixed length fields.
Next
From: Oliver Jowett
Date:
Subject: Re: Problem with fixed length fields.