Re: ResultSetMetaData.getTableName()

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jason Davies <jason(at)netspade(dot)com>
Cc: PostgreSQL JDBC <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: ResultSetMetaData.getTableName()
Date: 2001-11-24 18:00:07
Message-ID: 16346.1006624807@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Jason Davies <jason(at)netspade(dot)com> writes:
> Is there any chance ResultSetMetaData.getTableName(int column) could
> be implemented somehow?

The entire concept seems faulty. Select results don't come from any
particular table in the general case, and any tool that expects the
special case to apply to general queries is broken by design.

You do, of course, know which table the columns came from if you issue a
query like
SELECT * FROM foo
but you hardly need the backend to tell you so. ISTM that no frontend
tool should expect to associate particular table names with SELECT
results except when it knows the query is of such a simple form as this.

regards, tom lane

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Jason Davies 2001-11-24 18:13:37 Re: ResultSetMetaData.getTableName()
Previous Message Jason Davies 2001-11-24 16:35:49 ResultSetMetaData.getTableName()