Re: Explicit typing of numeric types - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Explicit typing of numeric types
Date
Msg-id 25058.1011110223@sss.pgh.pa.us
Whole thread Raw
In response to Explicit typing of numeric types  ("Alaric B. Snell" <abs@frontwire.com>)
List pgsql-jdbc
"Alaric B. Snell" <abs@frontwire.com> writes:
> Either way, can it do any *harm*? :-)

Certainly.  For example, suppose some app is using a setLong parameter to
output a constant that's actually being compared to an integer column.
Right now, this works (for "work" = "can be indexed").  With your
proposed hack, it wouldn't.

I realize it's pretty annoying to have to work around this at the
application level.  However, the app at least knows what it's doing,
ie, what data it's got and what the database column it's interested in
is.  Eventually, the backend will solve the problem correctly --- it
also has all the relevant information.  JDBC is the one place in the
chain that *cannot* solve the problem because it doesn't know enough.
Thus, a solution in JDBC cannot be a real solution, only a
broken-by-design kluge.

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Tom Lane
Date:
Subject: Re: Explicit typing of numeric types
Next
From: Colm McCartan
Date:
Subject: Re: [GENERAL] OT: anon CVS hassles