Re: Timestamp Conversion Woes Redux - Mailing list pgsql-jdbc

From Oliver Jowett
Subject Re: Timestamp Conversion Woes Redux
Date
Msg-id 42DD0824.9060002@opencloud.com
Whole thread Raw
In response to Re: Timestamp Conversion Woes Redux  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Timestamp Conversion Woes Redux  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Timestamp Conversion Woes Redux  (Csaba Nagy <nagy@ecircle-ag.com>)
List pgsql-jdbc
Tom Lane wrote:

> I think one main point against using UNKNOWN is that it creates a risk
> of "could not resolve parameter type" query failures.  That's OK for
> generic setString() cases, since the user can always escape the failure
> by changing his code to specify the parameter type more clearly.

> The other argument against UNKNOWN is that the backend might choose an
> unexpected data type.  Again, that doesn't scare me a lot for setString,
> because the backend's rules for dealing with UNKNOWN are biased in favor
> of resolving the parameter type as TEXT, which seems perfectly
> reasonable for setString cases.

The main thing I'm worried about there is that if there are cases where
an UNKNOWN parameter will generate an error rather than resolve to TEXT,
then the driver has just backed the user into a corner they can't escape
from. Are there any cases where this can happen? (I'm thinking of some
of the ambiguous-type problems we ran into when sending nulls as UNKNOWN..)

-O

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Timestamp Conversion Woes Redux
Next
From: Tom Lane
Date:
Subject: Re: Timestamp Conversion Woes Redux