Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id C1E29633DB1 for ; Mon, 2 Mar 2009 20:03:04 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 26631-01 for ; Mon, 2 Mar 2009 20:03:00 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id D5B85633C8A for ; Mon, 2 Mar 2009 20:02:57 -0400 (AST) Received: from 219-89-241-75.adsl.xtra.co.nz ([219.89.241.75] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LeI60-000416-AM; Tue, 03 Mar 2009 13:02:52 +1300 Message-ID: <49AC73AB.3030506@opencloud.com> Date: Tue, 03 Mar 2009 13:02:51 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: DGPickett CC: pgsql-jdbc@postgresql.org Subject: Re: ResultSetMetaData.getColumnDisplaySize returns 2147483647 ? References: <095cddc9-bca7-41a5-84a8-0faca7adadc2@f11g2000vbf.googlegroups.com> <3c7f373b-77e6-4860-984e-101af492abe3@f37g2000vbf.googlegroups.com> <8b19844a-98d4-4967-9426-3ddeec6f8559@a39g2000yqc.googlegroups.com> <49ABA286.7000707@opencloud.com> <5689f05b-134f-4510-af43-6fe763dfceb4@y13g2000yqn.googlegroups.com> In-Reply-To: <5689f05b-134f-4510-af43-6fe763dfceb4@y13g2000yqn.googlegroups.com> X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/6 X-Sequence-Number: 19336 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