X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 9B947D1B373 for ; Wed, 4 Aug 2004 16:57:53 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 56389-09 for ; Wed, 4 Aug 2004 19:57:53 +0000 (GMT) Received: from mail63.csoft.net (leary3.csoft.net [63.111.22.74]) by svr1.postgresql.org (Postfix) with SMTP id BB337D1B285 for ; Wed, 4 Aug 2004 16:57:48 -0300 (ADT) Received: (qmail 5783 invoked by uid 1112); 4 Aug 2004 19:35:38 -0000 Date: Wed, 4 Aug 2004 14:35:38 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Mike Martin Cc: pgsql-jdbc@postgresql.org Subject: Re: Wrong column names in ResultSetMetaData In-Reply-To: Message-ID: References: <41086EF8.7010101@opencloud.com> <410ED4E6.8020806@opencloud.com> <410EDF4D.6060808@opencloud.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/26 X-Sequence-Number: 10748 On Tue, 3 Aug 2004, Mike Martin wrote: > SELECT * FROM person inner join person parent on person.parent_id = > parent.id > > rs.getTableName() distinguishes person.name from parent.name. > > In my experience, drivers correctly implement getTableName() > *far* less frequently. I've never been able to rely on it. > > Of the drivers I have handy, only DB2J and MySQL get it right. > Cloudscape, Firebird, hsqldb, mssqlserver, and pg75 all return > the underlying base table name. JTDS, Oracle, and pg74 all > return empty strings! > You seem surprised that it would return an empty string, while that was what I was planning on making it do. Why should it return the base table name when it can't determine if it has been aliased? Isn't this returning incorrect information? Kris Jurka