X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id BF0F19FA357 for ; Mon, 3 Jul 2006 12:43:20 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 15594-09 for ; Mon, 3 Jul 2006 12:43:16 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (unknown [205.205.214.4]) by postgresql.org (Postfix) with SMTP id 49EBE9FA232 for ; Mon, 3 Jul 2006 12:43:16 -0300 (ADT) Received: (qmail 18925 invoked by uid 1112); 3 Jul 2006 15:43:15 -0000 Date: Mon, 3 Jul 2006 10:43:15 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: Yann PICHOT cc: pgsql-jdbc@postgresql.org Subject: Re: Diffrence between 8.0.3 and 8.1.3 In-Reply-To: <6ff7932d0607030819o4775c43fr2762dd390d4cd76@mail.gmail.com> Message-ID: References: <6ff7932d0607030819o4775c43fr2762dd390d4cd76@mail.gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200607/8 X-Sequence-Number: 15434 On Mon, 3 Jul 2006, Yann PICHOT wrote: > I use this JDBC Driver : > JDBC driver build number : 8.1.407-JDBC3 > Server version : test do on 8.0.3 (linux), 8.1.3 (linux) and 8.1.2 (windows) > > I have problem with the method getColumnDisplaySize in ResultSetMetaData > class. > > String SQLselect = "SELECT col1, cast(' ' as varchar(3)) as mycol > FROM mytable"; > stmt = conn.createStatement(); > ResultSet res = stmt.executeQuery(SQLselect); > ResultSetMetaData resMD = res.getMetaData(); > System.out.println(resMD.getColumnDisplaySize(2)); > > When i connect to 8.0.3 database the methode getColumnDisplaySize return 3, > a good value > When i connect to 8.1.2 or 8.1.3 database the methode getColumnDisplaySize > return -5, a bad value. > I cannot reproduce this with a 8.1.4 database and nothing in the 8.1.3 -> 8.1.4 release notes suggest that this behavior should have changed. Are you sure you're exactly describing your test, jdbc driver, and server versions? Kris Jurka