pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kris Jurka <books@ejurka.com>
To: Mike Martin <mmartin@vieo.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Wrong column names in ResultSetMetaData
Date: Wed, 4 Aug 2004 14:35:38 -0500 (EST)
Message-ID: <Pine.BSO.4.56.0408041433030.7043@leary.csoft.net> (raw)
In-Reply-To: <ceofog$15o1$1@news.hub.org>
References: <ce9dna$pne$1@news.hub.org>
	<ce9jk0$15mb$1@news.hub.org>
	<41086EF8.7010101@opencloud.com>
	<celqa5$i2c$1@news.hub.org>
	<Pine.BSO.4.56.0408021308010.29090@leary.csoft.net>
	<cembfp$1tpn$1@news.hub.org>
	<Pine.BSO.4.56.0408021705100.21355@leary.csoft.net>
	<410ED4E6.8020806@opencloud.com>
	<Pine.BSO.4.56.0408021925430.5931@leary.csoft.net>
	<410EDF4D.6060808@opencloud.com>
	<Pine.BSO.4.56.0408030045360.19025@leary.csoft.net>
	<ceofog$15o1$1@news.hub.org>



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



view thread (27+ messages)  latest in thread

Message-ID: <Pine.BSO.4.56.0408041433030.7043@leary.csoft.net>
Permalink:  ../Pine.BSO.4.56.0408041433030.7043@leary.csoft.net/
Also on:    postgresql.org/message-id/Pine.BSO.4.56.0408041433030.7043@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, mmartin@vieo.com
  Subject: Re: Wrong column names in ResultSetMetaData
  In-Reply-To: <Pine.BSO.4.56.0408041433030.7043@leary.csoft.net>
  References: <ce9dna$pne$1@news.hub.org> <ce9jk0$15mb$1@news.hub.org> <41086EF8.7010101@opencloud.com> <celqa5$i2c$1@news.hub.org> <Pine.BSO.4.56.0408021308010.29090@leary.csoft.net> <cembfp$1tpn$1@news.hub.org> <Pine.BSO.4.56.0408021705100.21355@leary.csoft.net> <410ED4E6.8020806@opencloud.com> <Pine.BSO.4.56.0408021925430.5931@leary.csoft.net> <410EDF4D.6060808@opencloud.com> <Pine.BSO.4.56.0408030045360.19025@leary.csoft.net> <ceofog$15o1$1@news.hub.org> <Pine.BSO.4.56.0408041433030.7043@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