pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Johanson <pg-user@kensystem.com>
To: pgsql-jdbc@postgresql.org
Cc: Kris Jurka <books@ejurka.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName,
Date: Thu, 04 Jan 2007 15:19:18 -0700
Message-ID: <459D7D66.6010202@kensystem.com> (raw)
In-Reply-To: <Pine.BSO.4.64.0701041609540.20842@leary2.csoft.net>
References: <4594B16C.5010609@kensystem.com>
	<3936D281-E235-4FB3-889E-08981ABB0954@fastcrypt.com>
	<Pine.BSO.4.64.0701041139350.18398@leary2.csoft.net>
	<459D3487.6080202@kensystem.com>
	<Pine.BSO.4.64.0701041225110.24201@leary2.csoft.net>
	<459D3F3E.5040006@kensystem.com>
	<Pine.BSO.4.64.0701041324480.24201@leary2.csoft.net>
	<459D6CEC.9040505@kensystem.com>
	<Pine.BSO.4.64.0701041609540.20842@leary2.csoft.net>

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





view thread (19+ messages)  latest in thread

Message-ID: <459D7D66.6010202@kensystem.com>
Permalink:  ../459D7D66.6010202@kensystem.com/
Also on:    postgresql.org/message-id/459D7D66.6010202@kensystem.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: pg-user@kensystem.com, books@ejurka.com, tgl@sss.pgh.pa.us
  Subject: Re: Support for DatabaseMetadata: getCatalogName, getTableName,
  In-Reply-To: <459D7D66.6010202@kensystem.com>
  References: <4594B16C.5010609@kensystem.com> <3936D281-E235-4FB3-889E-08981ABB0954@fastcrypt.com> <Pine.BSO.4.64.0701041139350.18398@leary2.csoft.net> <459D3487.6080202@kensystem.com> <Pine.BSO.4.64.0701041225110.24201@leary2.csoft.net> <459D3F3E.5040006@kensystem.com> <Pine.BSO.4.64.0701041324480.24201@leary2.csoft.net> <459D6CEC.9040505@kensystem.com> <Pine.BSO.4.64.0701041609540.20842@leary2.csoft.net> <459D7D66.6010202@kensystem.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox