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 195169FB3C4 for ; Fri, 22 Sep 2006 00:13:18 -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 91562-10 for ; Fri, 22 Sep 2006 00:13:08 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from yass.opencloud.co.nz (yass.opencloud.co.nz [131.203.101.226]) by postgresql.org (Postfix) with ESMTP id 185BB9FB3DB for ; Fri, 22 Sep 2006 00:13:02 -0300 (ADT) Received: from sony.opencloud.co.nz ([192.168.0.41]) by yass.opencloud.co.nz with asmtp (TLS-1.0:DHE_RSA_AES_128_CBC_SHA:16) (Exim 4.34) id 1GQbTF-0005Lv-N7; Fri, 22 Sep 2006 15:12:57 +1200 Message-ID: <451354B5.2070701@opencloud.com> Date: Fri, 22 Sep 2006 15:12:53 +1200 From: Oliver Jowett User-Agent: Mozilla Thunderbird 1.0.8 (X11/20060502) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Philip Yarra CC: Alex Stienstra , pgsql-jdbc@postgresql.org Subject: Re: ResultSetMetaData.getTableName() == null References: <20060921121816.9wvu8sr34w5c4848@webmail.versatel.nl> <45133DE5.4030100@utiba.com> In-Reply-To: <45133DE5.4030100@utiba.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.05 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200609/88 X-Sequence-Number: 15806 Philip Yarra wrote: > I don't know why it returns "" - perhaps someone else can answer that. > Mind you, Oracle 10g does the same. Sybase ASE 12.5 is the only DB I > have access to where I get a non-empty table name. There was a long discussion about this some time ago, see http://archives.postgresql.org/pgsql-jdbc/2004-08/msg00023.php or thereabouts which is when we started agreeing on things :) Essentially I think it boiled down to "getTableName() should return the table alias name", and since we don't have that available we return "". There's a postgresql-specific interface to get at the underlying table name (in the cases where that info is available). -O