Re: Problem with fixed length fields.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: Kris Jurka <books(at)ejurka(dot)com>, Dave Smith <dave(dot)smith(at)candata(dot)com>, pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Problem with fixed length fields.
Date: 2004-10-23 20:50:47
Message-ID: 27388.1098564647@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Oliver Jowett <oliver(at)opencloud(dot)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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Oliver Jowett 2004-10-23 21:21:11 Re: Problem with fixed length fields.
Previous Message Serguei Mokhov 2004-10-23 20:46:55 Translation updates: ru.po