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 21:54:45
Message-ID: 27720.1098568485@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:
>> 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christian Niles 2004-10-24 17:34:15 LargeObject API and OIDs
Previous Message Oliver Jowett 2004-10-23 21:21:11 Re: Problem with fixed length fields.