From: Oliver Jowett <oliver@opencloud.com>
To: DGPickett <DGPickett@aol.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: ResultSetMetaData.getColumnDisplaySize returns 2147483647 ?
Date: Tue, 03 Mar 2009 13:02:51 +1300
Message-ID: <49AC73AB.3030506@opencloud.com> (raw)
In-Reply-To: <5689f05b-134f-4510-af43-6fe763dfceb4@y13g2000yqn.googlegroups.com>
References: <095cddc9-bca7-41a5-84a8-0faca7adadc2@f11g2000vbf.googlegroups.com>
<Pine.BSO.4.64.0902251858180.2899@leary.csoft.net>
<be6ffbdc-6190-4f2b-8e2e-b45fa9e5a596@r27g2000vbp.googlegroups.com>
<Pine.BSO.4.64.0902261310090.24291@leary.csoft.net>
<3c7f373b-77e6-4860-984e-101af492abe3@f37g2000vbf.googlegroups.com>
<Pine.BSO.4.64.0902261553090.26397@leary.csoft.net>
<8b19844a-98d4-4967-9426-3ddeec6f8559@a39g2000yqc.googlegroups.com>
<49ABA286.7000707@opencloud.com>
<5689f05b-134f-4510-af43-6fe763dfceb4@y13g2000yqn.googlegroups.com>
DGPickett wrote:
> If you have to change calling code to access Postgres, it violates the
> original promise of JDBC: use me and be portable.
JDBC in general failed that requirement a long time ago, I'm afraid.
Whenever I'm writing a JDBC client, I invariably end up with a strategy
object that's customized for each RDBMS target. About the only thing
that is truely portable is the overall infrastructure of
Connection/PreparedStatement/ResultSet etc.
Anyway, if JDBC is meant to be a portable adaptor to existing RDBMSes,
then it should provide a superset of existing capabilities that degrades
nicely when some are not available on a particular RDBMS. It
demonstrably doesn't do that in this case.
You seem to consider JDBC as an end in itself, rather than just another
interface target to adapt an existing DB to. I don't think it's
reasonable or expected for the existing core server to jump through
hoops and change behavior solely for the sake of what the JDBC interface
happens to want. Obviously, if there's some extra data that's easy for
the server to provide, that's a good thing - and in fact we got a lot of
extra metadata in the v3 protocol specifically to help out JDBC. But it
does not seem to be easy (or even universally possible) for the server
to give us the metadata in the limited form that the JDBC interface
expects here.
Again, I ask: Do you have a better suggestion for how the JDBC driver
should handle this case, given the data it gets from the server?
-O
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: oliver@opencloud.com, DGPickett@aol.com
Subject: Re: ResultSetMetaData.getColumnDisplaySize returns 2147483647 ?
In-Reply-To: <49AC73AB.3030506@opencloud.com>
References: <095cddc9-bca7-41a5-84a8-0faca7adadc2@f11g2000vbf.googlegroups.com> <Pine.BSO.4.64.0902251858180.2899@leary.csoft.net> <be6ffbdc-6190-4f2b-8e2e-b45fa9e5a596@r27g2000vbp.googlegroups.com> <Pine.BSO.4.64.0902261310090.24291@leary.csoft.net> <3c7f373b-77e6-4860-984e-101af492abe3@f37g2000vbf.googlegroups.com> <Pine.BSO.4.64.0902261553090.26397@leary.csoft.net> <8b19844a-98d4-4967-9426-3ddeec6f8559@a39g2000yqc.googlegroups.com> <49ABA286.7000707@opencloud.com> <5689f05b-134f-4510-af43-6fe763dfceb4@y13g2000yqn.googlegroups.com> <49AC73AB.3030506@opencloud.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox