From: | Dave Cramer <Dave(at)micro-automation(dot)net> |
---|---|
To: | Dror Matalon <dror(at)zapatec(dot)com> |
Cc: | PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: getTableName |
Date: | 2002-12-16 19:39:47 |
Message-ID: | 1040067587.16014.212.camel@inspiron.cramers |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)postgresql(dot)org
> > >
> >
> >
> >
> > ---------------------------(end of broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please send an appropriate
> > subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> > message can get through to the mailing list cleanly
--
Dave Cramer <Dave(at)micro-automation(dot)net>
From | Date | Subject | |
---|---|---|---|
Next Message | Dror Matalon | 2002-12-16 19:57:05 | Re: getTableName |
Previous Message | Dror Matalon | 2002-12-16 19:18:20 | getTableName |