X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 6E9B111F61F6 for ; Tue, 18 Apr 2006 13:18:48 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.108 X-Spam-Level: X-Spam-Status: No, score=0.108 required=5 tests=[AWL=0.108] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id nv774UHj0mGR for ; Tue, 18 Apr 2006 13:18:43 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with SMTP id E2F4811F6004 for ; Tue, 18 Apr 2006 13:18:42 -0300 (ADT) Received: (qmail 22909 invoked by uid 1112); 18 Apr 2006 16:18:38 -0000 Date: Tue, 18 Apr 2006 11:18:38 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: Xavier Poinsard cc: pgsql-jdbc@postgresql.org Subject: Re: Patch adding empty missing columns for getTables In-Reply-To: <444503FB.30204@free.fr> Message-ID: References: <444503FB.30204@free.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Archive-Number: 200604/130 X-Sequence-Number: 15064 On Tue, 18 Apr 2006, Xavier Poinsard wrote: > The attached patch add empty columns to the resultset returned by > AbstractJdbc2MetaData.getTables(). > According to JAVA 1.5 javadoc, it should return 10 columns and we are > currently returning only 5. There are a number of differences in the metadata returned between JDBC2 and JDBC3. The correct place to make this change would be to AbstractJdbc3DatabaseMetaData so that it overrides the JDBC3 behavior, but leaves the JDBC2 format unchanged. This should be done for all the places that have changed in JDBC3, see section 7.8 of the JDBC3 spec. > Maybe someone familiar with the system tables could modify the query to > return the expected values. With this patch, at least (and it is > allowed) null columns are returned and we don't get array indices > exceptions. > I'm not particularly excited about filling some unknown columns with NULL values. I think some attempt should be made to understand what these columns are supposed to be, my quick reading of the javadoc yields no hints though. Even if you don't know the system catalogs well we can help you with that if you tell us what you're looking for. Kris Jurka