Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 8DDBD9FA304 for ; Thu, 4 Jan 2007 17:16:16 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-new, port 10024) with ESMTP id 74904-07 for ; Thu, 4 Jan 2007 17:16:07 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by postgresql.org (Postfix) with ESMTP id D334C9FA131 for ; Thu, 4 Jan 2007 17:15:51 -0400 (AST) Received: by mail63.csoft.net (Postfix, from userid 1112) id 06317F1B3; Thu, 4 Jan 2007 16:15:49 -0500 (EST) Date: Thu, 4 Jan 2007 16:15:48 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary2.csoft.net To: Ken Johanson cc: pgsql-jdbc@postgresql.org, Dave Cramer Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName, In-Reply-To: <459D6CEC.9040505@kensystem.com> Message-ID: References: <4594B16C.5010609@kensystem.com> <3936D281-E235-4FB3-889E-08981ABB0954@fastcrypt.com> <459D3487.6080202@kensystem.com> <459D3F3E.5040006@kensystem.com> <459D6CEC.9040505@kensystem.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: 200701/27 X-Sequence-Number: 16392 On Thu, 4 Jan 2007, Ken Johanson wrote: > I guess I am not fully understanding why getTableName isn't just being > populated with PGResultSetMetaData.getBaseTableName() in the first place; if > so please feel welcome to hit me over the head with the cold hard truth ;-) > The previous discussion I cited was referring to getColumnName and how it really should be referring to the alias of a result, not the column itself. That is for "SELECT a AS b FROM c AS d" should return "b" for getColumnName(1). If we accept that as true then it follows that getTableName(1) should return "d", not "c". Right now we don't have the information to return "d" and so we must always return the empty string. Getting the base column and table names seems more useful but does not appear to be what the javadoc and spec imply as the behavior of the standard API methods. Kris Jurka