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
--
Dror Matalon
Zapatec Inc
1700 MLK Way
Berkeley, CA 94709
http://www.zapatec.com