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

From Tom Lane
Subject Re: Explicit typing of numeric types
Date
Msg-id 24847.1011108980@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:
> After a painful experience with int8 indices not being used for:
> SELECT * FROM foo WHERE id = 1;
> ...since 1 is an int4 not an int8, I'm wondering if there would be
> anything wrong with making the JDBC driver always put out explicit type
> declarations?

(a) How would JDBC know what to do better than the backend does?
What happens when (not if) JDBC puts out an inappropriate coercion?

(b) This is an acknowledged shortcoming that will be fixed someday.
I don't think it's appropriate to try to put temporary band-aids for
backend shortcomings in frontend drivers.  Surely the folks working on
JDBC have their own set of shortcomings to work on...

            regards, tom lane

pgsql-jdbc by date:

Previous
From: "Dave Cramer"
Date:
Subject: Re: Problem with getImportedKeys / getExportedKeys
Next
From: Tom Lane
Date:
Subject: Re: Explicit typing of numeric types