From: | Oliver Jowett <oliver(at)opencloud(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
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:44:50 |
Message-ID: | 417AC2C2.40605@opencloud.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Tom Lane wrote:
> Kris Jurka <books(at)ejurka(dot)com> writes:
>
>>This is a problem with the driver because it is typing the ' ' values as
>>text, not char, so the comparison doesn't work right because these two
>>types handle trailing spaces differently.
>
>
> Can you refrain from assigning a type at all? People writing the
> equivalent SQL directly would almost always write 'foo', not
> 'foo'::text or 'foo'::char. The parser's behavior has been tuned
> so that that usually works nicely.
We've been trying to avoid that as there is currently no statement
Describe issued by the driver, so we'd run the risk that the parser
would infer something completely unexpected from the driver's point of
view. Also, we'd need the Describe to get useful information on when a
named statement can be safely reused (the driver currently gets this
wrong anyway, but it's fixable without needing a Describe as it stands).
Adding the Describe would add a round-trip to every query that involved
an unknown type.
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.
-O
From | Date | Subject | |
---|---|---|---|
Next Message | Serguei Mokhov | 2004-10-23 20:46:55 | Translation updates: ru.po |
Previous Message | Tom Lane | 2004-10-23 18:40:19 | Re: Problem with fixed length fields. |