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

From Tom Lane
Subject Re: Problem with fixed length fields.
Date
Msg-id 27720.1098568485@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.  (Kris Jurka <books@ejurka.com>)
List pgsql-jdbc
Oliver Jowett <oliver@opencloud.com> writes:
> Tom Lane wrote:
>> 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.

> Currently the driver issues Parse, Bind, Describe(portal), Execute,
> Sync. If I understand correctly, you're suggesting we do Parse,
> Describe(statement), Bind, Describe(portal), Execute, Sync.

Oh, I was thinking in terms of setting up a prepared statement.  You're
right, it seems risky to forge ahead to the Execute with an unknown
parameter type.

An alternative that might be worth investigating is to specify the type
as varchar instead of text.  I am not sure of all the ramifications of
this but in 7.4 and later it seems like it might do what you want.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Oliver Jowett
Date:
Subject: Re: Problem with fixed length fields.
Next
From: Christian Niles
Date:
Subject: LargeObject API and OIDs