Re: getTableName - Mailing list pgsql-jdbc

From Dave Cramer
Subject Re: getTableName
Date
Msg-id 1040067587.16014.212.camel@inspiron.cramers
Whole thread Raw
In response to getTableName  (Dror Matalon <dror@zapatec.com>)
Responses Re: getTableName
List pgsql-jdbc
Unfortunately we have no idea which table belongs with which column.

We would need the server to return fully qualified names such as
table.col

Dave
On Mon, 2002-12-16 at 14:18, Dror Matalon wrote:
> On Mon, Dec 16, 2002 at 11:00:24AM -0800, Barry Lind wrote:
> > You can also have lots of fun with getTableName() as well when the
> > 'table' may be a subquery in the from clause.  It isn't clear what
> > should be returned in many cases even if the server did support more.
>
>
> But at this point the driver doesn't return the table name even in cases
> where it's clear what the tablename should be.
>
>
> For instance if you do
>
>     select a from foo;
>
> you get an empty string instead of "foo" as the table name. How hard
> would it be to implement this in the driver? Is this something that the
> server has available that the driver could grab?
>
> This is an important feature for tool writers. For instance, I want to
> display a URL field as a <href> in a report. I keep meta information
> about this field, but I can't use it since I don't know which field it
> is when the user creates a SQL report because I don't know which table
> it belongs to.
>
> Getting getTableName() to work would solve this problem.
>
> Regards,
>
> Dror
>
>
> >
> > thanks,
> > --Barry
> >
> >
> > Gerlits AndrXs wrote:
> > >I was surprised to see that the getColumnLabel method in the
> > >ResultSetMetaData object returns the name of the column instead of the
> > >comment (when available).
> > >
> > >The documentation says that the method:
> > >"Gets the designated column's suggested title for use in printouts and
> > >displays."
> > >
> > >Any thoughts on that?
> > >
> > >I'd do it if you guys agree.
> > >
> > >Regards
> > >Andras Gerlits
> > >
> > >---------------------------(end of broadcast)---------------------------
> > >TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
> > >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo@postgresql.org so that your
> > message can get through to the mailing list cleanly
--
Dave Cramer <Dave@micro-automation.net>


pgsql-jdbc by date:

Previous
From: Dror Matalon
Date:
Subject: getTableName
Next
From: Dror Matalon
Date:
Subject: Re: getTableName