Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id CA7439FA589 for ; Thu, 4 Jan 2007 18:19:34 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-new, port 10024) with ESMTP id 02310-06 for ; Thu, 4 Jan 2007 18:19:25 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from www01.kensystem.com (www01.kensystem.com [72.19.170.120]) by postgresql.org (Postfix) with ESMTP id DF28D9FA509 for ; Thu, 4 Jan 2007 18:19:28 -0400 (AST) Received: from 192.168.0.3 by www01.kensystem.com (SMTPD); id s20070104221918.3142; Thu, 04 Jan 2007 22:19:18 Message-ID: <459D7D66.6010202@kensystem.com> Date: Thu, 04 Jan 2007 15:19:18 -0700 From: Ken Johanson User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org CC: Kris Jurka , Tom Lane Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName, References: <4594B16C.5010609@kensystem.com> <3936D281-E235-4FB3-889E-08981ABB0954@fastcrypt.com> <459D3487.6080202@kensystem.com> <459D3F3E.5040006@kensystem.com> <459D6CEC.9040505@kensystem.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200701/31 X-Sequence-Number: 16396 Kris Jurka wrote: > 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". Understood now, thanks. I agree/vote this is the best spec interpretation/behavior (for its lack of a 'getTableLabel'). It also is in line with a couple other driver's (inc mysqls') current impls. 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 > So to be sure, this (literal and alias name differentiation) actually is not being provided via the current server V3 protocol or server? If so, does anyone know off hand if V3 is somehow extensible; i.e can we add in metadata without breaking apps or major version? Again, just trying to get an idea of how near or far off this may be. I think there are several high level object persistence wrappers out there that depend (right or wrong) on table names/aliases to reconstitute objects from selects and natural/inner joins. Ken