pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Goran Popov <goran.popov@prokomsoft.rs>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: TableName
Date: Mon, 29 Oct 2012 22:49:20 -0300 (ADT)
Message-ID: <alpine.BSO.2.00.1210292244540.18822@leary.csoft.net> (raw)
In-Reply-To: <508EA11A.7080104@prokomsoft.rs>
References: <508EA11A.7080104@prokomsoft.rs>



On Mon, 29 Oct 2012, Goran Popov wrote:

> Whay this is default
>  public String getTableName(int column) throws SQLException
>     {
>         return "";
>     }
> 

For symmetry with getColumnName.  Currently getColumnName 
returns the aliased column name so that "SELECT a AS b FROM c 
AS d" returns "b" for getColumnName.  So we'd like to be able 
to return "d" for getTableName, but do not have sufficient 
information to do so, so we return "".

My recollection of previous discussions was that getColumnName should 
return "a" and getColumnLabel should return "b".  Then getTableName could 
return "c" without inconsistency.  The problem is that a lot of code has 
been written assuming that getColumnName will return the aliased version, 
so we'd need a configuration option to determine which behavior to use.  
This makes it more work than just a straight switchover and is likely the 
reason this hasn't been done.

Kris Jurka




view thread (4+ messages)  latest in thread

Message-ID: <alpine.BSO.2.00.1210292244540.18822@leary.csoft.net>
Permalink:  ../alpine.BSO.2.00.1210292244540.18822@leary.csoft.net/
Also on:    postgresql.org/message-id/alpine.BSO.2.00.1210292244540.18822@leary.csoft.net

 · 

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: books@ejurka.com, goran.popov@prokomsoft.rs
  Subject: Re: TableName
  In-Reply-To: <alpine.BSO.2.00.1210292244540.18822@leary.csoft.net>
  References: <508EA11A.7080104@prokomsoft.rs> <alpine.BSO.2.00.1210292244540.18822@leary.csoft.net>

* 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