Re: Explicit typing of numeric types

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Alaric B(dot) Snell" <abs(at)frontwire(dot)com>
Cc: pgsql-jdbc(at)postgresql(dot)org
Subject: Re: Explicit typing of numeric types
Date: 2002-01-15 15:57:03
Message-ID: 25058.1011110223@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

"Alaric B. Snell" <abs(at)frontwire(dot)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

Browse pgsql-jdbc by date

  From Date Subject
Next Message Colm McCartan 2002-01-15 16:09:10 Re: [GENERAL] OT: anon CVS hassles
Previous Message Tom Lane 2002-01-15 15:36:20 Re: Explicit typing of numeric types