Re: Release 1204 released

From: "Markus KARG" <markus(at)headcrashing(dot)eu>
To: "'Dave Cramer'" <pg(at)fastcrypt(dot)com>, "'Thomas Kellerer'" <spam_eater(at)gmx(dot)net>
Cc: "'List'" <pgsql-jdbc(at)postgresql(dot)org>, <lance(dot)andersen(at)oracle(dot)com>
Subject: Re: Release 1204 released
Date: 2015-10-15 21:17:44
Message-ID: 013401d1078e$ef0c82a0$cd2587e0$@eu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Obviously getColumns() is the only way to request the column definitions for a view, as there is no distinct such method explicitly for views. Sad but true, the field TABLE_TYPE is existing for getTables() and getTableTypes() but not for getColumns(). Maybe it would be a good idea to add it to the JDBC spec? Anyways, Thomas apparently is right. Any tool that wants to learn about the structure of a view has no other chance than using getColumns().

From: pgsql-jdbc-owner(at)postgresql(dot)org [mailto:pgsql-jdbc-owner(at)postgresql(dot)org] On Behalf Of Dave Cramer
Sent: Donnerstag, 15. Oktober 2015 22:48
To: Thomas Kellerer
Cc: List; lance(dot)andersen(at)oracle(dot)com
Subject: Re: [JDBC] Release 1204 released

So I am looking at the API reference and no where does it say getColumns should return information about views.

That being said the fact that getTables returns the type of the table there may be some inference that it should ?

Lance, do you have some insight here ?

Dave Cramer

davec(at)postgresintl(dot)com

www.postgresintl.com

On 15 October 2015 at 07:10, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:

Yes, this looks like it needs to be reverted....

Dave Cramer

davec(at)postgresintl(dot)com

www.postgresintl.com

On 15 October 2015 at 05:10, Thomas Kellerer <spam_eater(at)gmx(dot)net> wrote:

Dave Cramer schrieb am 09.10.2015 um 21:32:
> * fix: filter DatabaseMetaData.getColumns by tables PR #386 (0c95126)

Why was this done?

From my perspective this is a serious bug, because now getColumns() doesn't return column information for views, materialized views or foreign tables any more.

Which in turn means that the SQL client I am maintaining (SQL Workbench/J) is no longer able to display column information for anything else than tables.

I would assume that this is true for any other JDBC based SQL client. It will also break tools like Liquibase and probably Hibernate as well as they also rely on getColumns() to return information about views (I am sure about Liquibase, not 100% sure about Hibernate though)

Regards
Thomas

--
Sent via pgsql-jdbc mailing list (pgsql-jdbc(at)postgresql(dot)org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Kellerer 2015-10-15 21:39:17 Re: Release 1204 released
Previous Message Dave Cramer 2015-10-15 20:47:34 Re: Release 1204 released