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 BF2329FB314 for ; Fri, 22 Sep 2006 02:20:12 -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 06137-08 for ; Fri, 22 Sep 2006 02:20:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from mail.utiba.com.au (eth2643.vic.adsl.internode.on.net [150.101.158.82]) by postgresql.org (Postfix) with ESMTP id 20DF39FB2FD for ; Fri, 22 Sep 2006 02:19:59 -0300 (ADT) Received: from localhost (scan1.utiba.com.au [127.0.0.1]) by mail.utiba.com.au (Postfix) with ESMTP id 7F9F2444BD; Fri, 22 Sep 2006 15:19:57 +1000 (EST) Received: from mail.utiba.com.au ([127.0.0.1]) by localhost (scan1.utiba.com.au [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 24679-09; Fri, 22 Sep 2006 15:19:51 +1000 (EST) Received: from [192.168.0.49] (pc49.utiba.melb [192.168.0.49]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.utiba.com.au (Postfix) with ESMTP id ED44B444B1; Fri, 22 Sep 2006 15:19:50 +1000 (EST) Message-ID: <4513727F.10107@utiba.com> Date: Fri, 22 Sep 2006 15:19:59 +1000 From: Philip Yarra User-Agent: Mozilla Thunderbird 1.0.7 (X11/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Oliver Jowett Cc: Alex Stienstra , pgsql-jdbc@postgresql.org Subject: Re: ResultSetMetaData.getTableName() == null References: <20060921121816.9wvu8sr34w5c4848@webmail.versatel.nl> <45133DE5.4030100@utiba.com> <451354B5.2070701@opencloud.com> <45135D9B.50500@utiba.com> <45135EE2.6020507@opencloud.com> In-Reply-To: <45135EE2.6020507@opencloud.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at utiba.com.au X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.135 tagged_above=0 required=5 tests=FORGED_RCVD_HELO X-Spam-Level: X-Archive-Number: 200609/91 X-Sequence-Number: 15809 Oliver Jowett wrote: > We don't know whether aliases have been used or not so we can't do this. Just had a look at the source for getTableName: public String getTableName(int column) throws SQLException { return ""; } I can cast rsmd to PGResultSetMetaData and call getBaseTableName, and it does what I expect - in my example, gets the table name... so is there some reason why getTableName couldn't be re-written as: public String getTableName(int column) throws SQLException { return getBaseTableName(column); } Sorry if this is re-hashing old ground - I read the thread you mentioned before, but that seemed to be more about getting column names where they're aliased in the query using an AS clause. I'm assuming there's a lot of background that led to the implementation we have currently... any hints gratefully accepted. Regards, Philip. -- Philip Yarra Senior Software Engineer, Utiba Pty Ltd philip@utiba.com