Re: getTableName

Поиск
Список
Период
Сортировка
От Dror Matalon
Тема Re: getTableName
Дата
Msg-id 20021216195705.GR46654@rlx11.zapatec.com
обсуждение исходный текст
Ответ на Re: getTableName  (Dave Cramer <Dave@micro-automation.net>)
Ответы Re: getTableName  ("Ray Madigan" <ray@madigans.org>)
Список pgsql-jdbc
On Mon, Dec 16, 2002 at 02:39:47PM -0500, Dave Cramer wrote:
> 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

Any idea how hard would it be to get the server to provide this
functionality?

By the way, mysql has had this functionality for at least a couple of
years.

Dror

>
> 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>
>

--
Dror Matalon
Zapatec Inc
1700 MLK Way
Berkeley, CA 94709
http://www.zapatec.com

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Dave Cramer
Дата:
Сообщение: Re: getTableName
Следующее
От: Fernando Nasser
Дата:
Сообщение: Re: getTableName