pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Release 1204 released
21+ messages / 7 participants
[nested] [flat]

* Release 1204 released
@ 2015-10-09 19:32  Dave Cramer <davecramer@gmail.com>
  0 siblings, 2 replies; 21+ messages in thread

From: Dave Cramer @ 2015-10-09 19:32 UTC (permalink / raw)
  To: pgsql-jdbc

The following changes were made:

Alexey Mozhenin <https://github.com/amozhenin;

   - fix: Make sure copy manager completesPR #378 (7c420ed)
   - test: update for CopyLargeFileTest test to fit into 10 minutes limit
   PR #378 (39cd851)

Dave Cramer <http://postgresintl.com/;

   - fix: implemented getFunctions in jdbc4 (03483e1)
   - fix: error in getFunctionColumns PR #376 (5fafb86)
   - fix: filter DatabaseMetaData.getColumns by tables PR #386 (0c95126)
   - fix: abort connections after IOException instead of close PR #392
   (3e68a70)

Vladimir Sitnikov <https://github.com/vlsi;

   - pref: improve executeBatch by avoiding statement-by-statement
   execution PR #380 (92a9f30)
   - perf: improve setTimestamp, setTime, setDate performance PR #379
   (5a03a6e)
   - chore: update jmh, drop irrelevant benchmark
   Parser#unmarkDoubleQuestion PR #384 (0d1237c)
   - chore: add more benchmarks, add missing FlightRecorderProfiler PR #385
   (613a641)
   - feat: ignore empty sub-queries in composite queries PR #386 (3fb8046)
   - fix: binary processing of Date/Time/Timestamps PR #387 (5ec0ac3)
   - test: add tests for parsing of empty queries separated by semicolons
   PR #388 (d9310ce)
   - fix: ConcurrentModificationException when calling
   PreparedStatement.close from a concurrent thread PR #392 (40bcc01)


Thanks; your contributions are greatly appreciated!


Dave Cramer

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-09 19:43  Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  parent: Dave Cramer <davecramer@gmail.com>
  1 sibling, 1 reply; 21+ messages in thread

From: Vladimir Sitnikov @ 2015-10-09 19:43 UTC (permalink / raw)
  To: Dave Cramer <davecramer@gmail.com>; +Cc: pgsql-jdbc

Dave, thank you for being a release manager.

Vladimir


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



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-11 14:21  Dave Cramer <davecramer@gmail.com>
  parent: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Dave Cramer @ 2015-10-11 14:21 UTC (permalink / raw)
  To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: pgsql-jdbc

Vladimir,

Thanks for all of your contributions!

Cheers,

Dave Cramer

On 9 October 2015 at 15:43, Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
wrote:

> Dave, thank you for being a release manager.
>
> Vladimir
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 09:10  Thomas Kellerer <spam_eater@gmx.net>
  parent: Dave Cramer <davecramer@gmail.com>
  1 sibling, 1 reply; 21+ messages in thread

From: Thomas Kellerer @ 2015-10-15 09:10 UTC (permalink / raw)
  To: pgsql-jdbc

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

Why was this done? 



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 11:10  Dave Cramer <pg@fastcrypt.com>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  0 siblings, 1 reply; 21+ messages in thread

From: Dave Cramer @ 2015-10-15 11:10 UTC (permalink / raw)
  To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc

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

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 15 October 2015 at 05:10, Thomas Kellerer <spam_eater@gmx.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 20:47  Dave Cramer <pg@fastcrypt.com>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 3 replies; 21+ messages in thread

From: Dave Cramer @ 2015-10-15 20:47 UTC (permalink / raw)
  To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc; lance.andersen@oracle.com

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@postgresintl.com
www.postgresintl.com

On 15 October 2015 at 07:10, Dave Cramer <pg@fastcrypt.com> wrote:

> Yes, this looks like it needs to be reverted....
>
> Dave Cramer
>
> davec@postgresintl.com
> www.postgresintl.com
>
> On 15 October 2015 at 05:10, Thomas Kellerer <spam_eater@gmx.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@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc
>>
>
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 21:17  Markus KARG <markus@headcrashing.eu>
  parent: Dave Cramer <pg@fastcrypt.com>
  2 siblings, 0 replies; 21+ messages in thread

From: Markus KARG @ 2015-10-15 21:17 UTC (permalink / raw)
  To: 'Dave Cramer' <pg@fastcrypt.com>; 'Thomas Kellerer' <spam_eater@gmx.net>; +Cc: pgsql-jdbc; lance.andersen@oracle.com

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@postgresql.org [mailto:pgsql-jdbc-owner@postgresql.org] On Behalf Of Dave Cramer
Sent: Donnerstag, 15. Oktober 2015 22:48
To: Thomas Kellerer
Cc: List; lance.andersen@oracle.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@postgresintl.com

www.postgresintl.com

 

On 15 October 2015 at 07:10, Dave Cramer <pg@fastcrypt.com> wrote:

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




Dave Cramer

davec@postgresintl.com

www.postgresintl.com

 

On 15 October 2015 at 05:10, Thomas Kellerer <spam_eater@gmx.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?

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 21:39  Thomas Kellerer <spam_eater@gmx.net>
  parent: Dave Cramer <pg@fastcrypt.com>
  2 siblings, 1 reply; 21+ messages in thread

From: Thomas Kellerer @ 2015-10-15 21:39 UTC (permalink / raw)
  To: pgsql-jdbc

All I can say is, that due to the nature of SQL Workbench (being DBMS independent) I do use (or at least test)
many other DBMS and every[1] other JDBC driver does return view columns - including materialized views in Oracle and DB2.

So apparently all the other vendors think it makes sense to return view (and materialized view) columns.

Thomas

[1] I have tested at least briefly more than 15 different ones.


Dave Cramer schrieb am 15.10.2015 um 22:47:
> 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
>
> On 15 October 2015 at 05:10, Thomas Kellerer <spam_eater@gmx.net
> <mailto:spam_eater@gmx.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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 21:53  Dave Cramer <pg@fastcrypt.com>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  0 siblings, 2 replies; 21+ messages in thread

From: Dave Cramer @ 2015-10-15 21:53 UTC (permalink / raw)
  To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc

That's fine. I'll revert it. But I think the previous issue was that it was
also returning indexes as well. I'll just narrow down to tables, views, and
mat views

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 15 October 2015 at 17:39, Thomas Kellerer <spam_eater@gmx.net> wrote:

> All I can say is, that due to the nature of SQL Workbench (being DBMS
> independent) I do use (or at least test)
> many other DBMS and every[1] other JDBC driver does return view columns -
> including materialized views in Oracle and DB2.
>
> So apparently all the other vendors think it makes sense to return view
> (and materialized view) columns.
>
> Thomas
>
> [1] I have tested at least briefly more than 15 different ones.
>
>
> Dave Cramer schrieb am 15.10.2015 um 22:47:
>
>> 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
>>
>> On 15 October 2015 at 05:10, Thomas Kellerer <spam_eater@gmx.net
>> <mailto:spam_eater@gmx.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@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 21:57  Kevin Grittner <kgrittn@ymail.com>
  parent: Dave Cramer <pg@fastcrypt.com>
  1 sibling, 1 reply; 21+ messages in thread

From: Kevin Grittner @ 2015-10-15 21:57 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc

On Thursday, October 15, 2015 4:54 PM, Dave Cramer <pg@fastcrypt.com> wrote:

> I'll revert it. But I think the previous issue was that it was
> also returning indexes as well. I'll just narrow down to tables,
> views, and mat views

... and foreign tables, please.

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 22:02  Dave Cramer <pg@fastcrypt.com>
  parent: Kevin Grittner <kgrittn@ymail.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Dave Cramer @ 2015-10-15 22:02 UTC (permalink / raw)
  To: Kevin Grittner <kgrittn@ymail.com>; +Cc: Thomas Kellerer <spam_eater@gmx.net>; pgsql-jdbc

Interesting do we even return FT's now in getTables ?


Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 15 October 2015 at 17:57, Kevin Grittner <kgrittn@ymail.com> wrote:

> On Thursday, October 15, 2015 4:54 PM, Dave Cramer <pg@fastcrypt.com>
> wrote:
>
> > I'll revert it. But I think the previous issue was that it was
> > also returning indexes as well. I'll just narrow down to tables,
> > views, and mat views
>
> ... and foreign tables, please.
>
> --
> Kevin Grittner
> EDB: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 22:04  Dave Cramer <pg@fastcrypt.com>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 0 replies; 21+ messages in thread

From: Dave Cramer @ 2015-10-15 22:04 UTC (permalink / raw)
  To: Kevin Grittner <kgrittn@ymail.com>; +Cc: Thomas Kellerer <spam_eater@gmx.net>; pgsql-jdbc

Just checked and we do

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 15 October 2015 at 18:02, Dave Cramer <pg@fastcrypt.com> wrote:

> Interesting do we even return FT's now in getTables ?
>
>
> Dave Cramer
>
> davec@postgresintl.com
> www.postgresintl.com
>
> On 15 October 2015 at 17:57, Kevin Grittner <kgrittn@ymail.com> wrote:
>
>> On Thursday, October 15, 2015 4:54 PM, Dave Cramer <pg@fastcrypt.com>
>> wrote:
>>
>> > I'll revert it. But I think the previous issue was that it was
>> > also returning indexes as well. I'll just narrow down to tables,
>> > views, and mat views
>>
>> ... and foreign tables, please.
>>
>> --
>> Kevin Grittner
>> EDB: http://www.enterprisedb.com
>> The Enterprise PostgreSQL Company
>>
>
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 22:19  Thomas Kellerer <spam_eater@gmx.net>
  parent: Dave Cramer <pg@fastcrypt.com>
  1 sibling, 2 replies; 21+ messages in thread

From: Thomas Kellerer @ 2015-10-15 22:19 UTC (permalink / raw)
  To: pgsql-jdbc

Wouldn't it make more sense to _exclude_ those types that should
absolutely not appear there?

I don't really see the point of excluding anything there in the first place
to be honest.

This method won't get called "accidently" with some random object name.
If that is an index (or something else), that's what the user requested.

As indexes and tables share the same namespace there will never be
any ambiguity which object is meant.

Currently the driver also returns columns for types "create type foo as ..."
I do rely on that as well.

Regards
Thomas
  
  
Dave Cramer schrieb am 15.10.2015 um 23:53:
> That's fine. I'll revert it. But I think the previous issue was that
> it was also returning indexes as well. I'll just narrow down to
> tables, views, and mat views
>
> Dave Cramer
>
> davec@postgresintl.com <mailto:davec@postgresintl.com>
> www.postgresintl.com <http://www.postgresintl.com;
>
> On 15 October 2015 at 17:39, Thomas Kellerer <spam_eater@gmx.net <mailto:spam_eater@gmx.net>> wrote:
>
>     All I can say is, that due to the nature of SQL Workbench (being DBMS independent) I do use (or at least test)
>     many other DBMS and every[1] other JDBC driver does return view columns - including materialized views in Oracle and DB2.
>
>     So apparently all the other vendors think it makes sense to return view (and materialized view) columns.
>
>     Thomas
>
>     [1] I have tested at least briefly more than 15 different ones.




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



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-15 22:49  Dave Cramer <pg@fastcrypt.com>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  1 sibling, 1 reply; 21+ messages in thread

From: Dave Cramer @ 2015-10-15 22:49 UTC (permalink / raw)
  To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc

This was the original issue

https://github.com/pgjdbc/pgjdbc/issues/374

I don't think returning test_table_pkey is correct, hence the change

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 15 October 2015 at 18:19, Thomas Kellerer <spam_eater@gmx.net> wrote:

> Wouldn't it make more sense to _exclude_ those types that should
> absolutely not appear there?
>
> I don't really see the point of excluding anything there in the first place
> to be honest.
>
> This method won't get called "accidently" with some random object name.
> If that is an index (or something else), that's what the user requested.
>
> As indexes and tables share the same namespace there will never be
> any ambiguity which object is meant.
>
> Currently the driver also returns columns for types "create type foo as
> ..."
> I do rely on that as well.
>
> Regards
> Thomas
>   Dave Cramer schrieb am 15.10.2015 um 23:53:
>
>> That's fine. I'll revert it. But I think the previous issue was that
>> it was also returning indexes as well. I'll just narrow down to
>> tables, views, and mat views
>>
>> Dave Cramer
>>
>> davec@postgresintl.com <mailto:davec@postgresintl.com>
>> www.postgresintl.com <http://www.postgresintl.com;
>>
>> On 15 October 2015 at 17:39, Thomas Kellerer <spam_eater@gmx.net <mailto:
>> spam_eater@gmx.net>> wrote:
>>
>>     All I can say is, that due to the nature of SQL Workbench (being DBMS
>> independent) I do use (or at least test)
>>     many other DBMS and every[1] other JDBC driver does return view
>> columns - including materialized views in Oracle and DB2.
>>
>>     So apparently all the other vendors think it makes sense to return
>> view (and materialized view) columns.
>>
>>     Thomas
>>
>>     [1] I have tested at least briefly more than 15 different ones.
>>
>
>
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-16 06:50  Thomas Kellerer <spam_eater@gmx.net>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 21+ messages in thread

From: Thomas Kellerer @ 2015-10-16 06:50 UTC (permalink / raw)
  To: pgsql-jdbc

Interesting issue - that is indeed a use-case I didn't think about.

It's too bad that getColumns() doesn't return a "TABLE_TYPE" column that would match the types returned by getTableTypes()

However, information_schema.columns does return columns from views, so those should at least be included 
(although not getting columns for materialized views or types would mean I had to adjust my SQL Workbench for that)

Thomas


Dave Cramer schrieb am 16.10.2015 um 00:49:
> This was the original issue 
> 
> https://github.com/pgjdbc/pgjdbc/issues/374
> 
> I don't think returning test_table_pkey is correct, hence the change
> 
> Dave Cramer
> 
> davec@postgresintl.com <mailto:davec@postgresintl.com>
> www.postgresintl.com <http://www.postgresintl.com;
> 
> On 15 October 2015 at 18:19, Thomas Kellerer <spam_eater@gmx.net <mailto:spam_eater@gmx.net>> wrote:
> 
>     Wouldn't it make more sense to _exclude_ those types that should
>     absolutely not appear there?
> 
>     I don't really see the point of excluding anything there in the first place
>     to be honest.
> 
>     This method won't get called "accidently" with some random object name.
>     If that is an index (or something else), that's what the user requested.
> 
>     As indexes and tables share the same namespace there will never be
>     any ambiguity which object is meant.
> 
>     Currently the driver also returns columns for types "create type foo as ..."
>     I do rely on that as well.
> 
>     Regards
>     Thomas
>       Dave Cramer schrieb am 15.10.2015 um 23:53:
> 
>         That's fine. I'll revert it. But I think the previous issue was that
>         it was also returning indexes as well. I'll just narrow down to
>         tables, views, and mat views
> 
>         Dave Cramer
> 
>         davec@postgresintl.com <mailto:davec@postgresintl.com> <mailto:davec@postgresintl.com <mailto:davec@postgresintl.com>>
>         www.postgresintl.com <http://www.postgresintl.com; <http://www.postgresintl.com;
> 
>         On 15 October 2015 at 17:39, Thomas Kellerer <spam_eater@gmx.net <mailto:spam_eater@gmx.net> <mailto:spam_eater@gmx.net <mailto:spam_eater@gmx.net>>> wrote:
> 
>             All I can say is, that due to the nature of SQL Workbench (being DBMS independent) I do use (or at least test)
>             many other DBMS and every[1] other JDBC driver does return view columns - including materialized views in Oracle and DB2.
> 
>             So apparently all the other vendors think it makes sense to return view (and materialized view) columns.
> 
>             Thomas
> 
>             [1] I have tested at least briefly more than 15 different ones.
> 
> 
> 
> 
> 
>     -- 
>     Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org <mailto:pgsql-jdbc@postgresql.org>)
>     To make changes to your subscription:
>     http://www.postgresql.org/mailpref/pgsql-jdbc
> 
> 



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



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-16 06:51  Mark Rotteveel <mark@lawinegevaar.nl>
  parent: Dave Cramer <pg@fastcrypt.com>
  2 siblings, 0 replies; 21+ messages in thread

From: Mark Rotteveel @ 2015-10-16 06:51 UTC (permalink / raw)
  To: pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-16 06:57  Mark Rotteveel <mark@lawinegevaar.nl>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  1 sibling, 0 replies; 21+ messages in thread

From: Mark Rotteveel @ 2015-10-16 06:57 UTC (permalink / raw)
  To: pgsql-jdbc

The getTables and getColumns methods should be used for objects that can
be used in a FROM clause (getTables) or can be referenced in the select
column list (getColumns). If an index in PostgreSQL doesn't fit in those
categories, then it shouldn't be included (that is what getIndexInfo is
for). Most of the methods in DatabaseMetaData are not primarily for human
consumption, but to discover the structure of a database by a tool that for
example generates queries, etc.

Mark

On Fri, 16 Oct 2015 00:19:04 +0200, Thomas Kellerer <spam_eater@gmx.net>
wrote:
> Wouldn't it make more sense to _exclude_ those types that should
> absolutely not appear there?
> 
> I don't really see the point of excluding anything there in the first
place
> to be honest.
> 
> This method won't get called "accidently" with some random object name.
> If that is an index (or something else), that's what the user requested.
> 
> As indexes and tables share the same namespace there will never be
> any ambiguity which object is meant.
> 
> Currently the driver also returns columns for types "create type foo as
> ..."
> I do rely on that as well.
> 
> Regards
> Thomas
>   
>   
> Dave Cramer schrieb am 15.10.2015 um 23:53:
>> That's fine. I'll revert it. But I think the previous issue was that
>> it was also returning indexes as well. I'll just narrow down to
>> tables, views, and mat views
>>
>> Dave Cramer
>>
>> davec@postgresintl.com <mailto:davec@postgresintl.com>
>> www.postgresintl.com <http://www.postgresintl.com;
>>
>> On 15 October 2015 at 17:39, Thomas Kellerer <spam_eater@gmx.net
>> <mailto:spam_eater@gmx.net>> wrote:
>>
>>     All I can say is, that due to the nature of SQL Workbench (being
>>     DBMS independent) I do use (or at least test)
>>     many other DBMS and every[1] other JDBC driver does return view
>>     columns - including materialized views in Oracle and DB2.
>>
>>     So apparently all the other vendors think it makes sense to return
>>     view (and materialized view) columns.
>>
>>     Thomas
>>
>>     [1] I have tested at least briefly more than 15 different ones.


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



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-16 07:01  Mark Rotteveel <mark@lawinegevaar.nl>
  parent: Thomas Kellerer <spam_eater@gmx.net>
  0 siblings, 1 reply; 21+ messages in thread

From: Mark Rotteveel @ 2015-10-16 07:01 UTC (permalink / raw)
  To: pgsql-jdbc

On Fri, 16 Oct 2015 08:50:47 +0200, Thomas Kellerer <spam_eater@gmx.net>
wrote:
> Interesting issue - that is indeed a use-case I didn't think about.
> 
> It's too bad that getColumns() doesn't return a "TABLE_TYPE" column that
> would match the types returned by getTableTypes()
> 
> However, information_schema.columns does return columns from views, so
> those should at least be included 
> (although not getting columns for materialized views or types would mean
I
> had to adjust my SQL Workbench for that)

As I understand it, materialized views are a type of table (or maybe a
special type of view), and therefor should be returned by getTables. A JDBC
driver is free to define additional table types, as long as those types
behave like tables (as in: can be selected). Not sure how that works for
types.

Mark


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



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-16 10:43  Dave Cramer <pg@fastcrypt.com>
  parent: Mark Rotteveel <mark@lawinegevaar.nl>
  0 siblings, 2 replies; 21+ messages in thread

From: Dave Cramer @ 2015-10-16 10:43 UTC (permalink / raw)
  To: Mark Rotteveel <mark@lawinegevaar.nl>; +Cc: pgsql-jdbc

Here is the proposed PR https://github.com/pgjdbc/pgjdbc/pull/403

Please comment

Dave Cramer

davec@postgresintl.com
www.postgresintl.com

On 16 October 2015 at 03:01, Mark Rotteveel <mark@lawinegevaar.nl> wrote:

> On Fri, 16 Oct 2015 08:50:47 +0200, Thomas Kellerer <spam_eater@gmx.net>
> wrote:
> > Interesting issue - that is indeed a use-case I didn't think about.
> >
> > It's too bad that getColumns() doesn't return a "TABLE_TYPE" column that
> > would match the types returned by getTableTypes()
> >
> > However, information_schema.columns does return columns from views, so
> > those should at least be included
> > (although not getting columns for materialized views or types would mean
> I
> > had to adjust my SQL Workbench for that)
>
> As I understand it, materialized views are a type of table (or maybe a
> special type of view), and therefor should be returned by getTables. A JDBC
> driver is free to define additional table types, as long as those types
> behave like tables (as in: can be selected). Not sure how that works for
> types.
>
> Mark
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc
>

^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-16 17:04  Mark Rotteveel <mark@lawinegevaar.nl>
  parent: Dave Cramer <pg@fastcrypt.com>
  1 sibling, 0 replies; 21+ messages in thread

From: Mark Rotteveel @ 2015-10-16 17:04 UTC (permalink / raw)
  To: pgsql-jdbc

On 16-10-2015 12:43, Dave Cramer wrote:
> Here is the proposed PR https://github.com/pgjdbc/pgjdbc/pull/403
>
> Please comment

Looks ok to me.

Mark
-- 
Mark Rotteveel


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



^ permalink  raw  reply  [nested|flat] 21+ messages in thread

* Re: Release 1204 released
@ 2015-10-16 17:37  Thomas Kellerer <spam_eater@gmx.net>
  parent: Dave Cramer <pg@fastcrypt.com>
  1 sibling, 0 replies; 21+ messages in thread

From: Thomas Kellerer @ 2015-10-16 17:37 UTC (permalink / raw)
  To: pgsql-jdbc

Dave Cramer schrieb am 16.10.2015 um 12:43:
> Here is the proposed PR https://github.com/pgjdbc/pgjdbc/pull/403
>
> Please comment
>
> Dave Cramer

Looks OK to me although it means I now need to copy the statement
out of the driver in order to retrieve the columns of a type.

But it's still better than having to do that for views, mviews and
foreign tables as well.

Thanks
Thomas




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



^ permalink  raw  reply  [nested|flat] 21+ messages in thread


end of thread, other threads:[~2015-10-16 17:37 UTC | newest]

Thread overview: 21+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 19:32 Release 1204 released Dave Cramer <davecramer@gmail.com>
2015-10-09 19:43 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2015-10-11 14:21   ` Dave Cramer <davecramer@gmail.com>
2015-10-15 09:10 ` Thomas Kellerer <spam_eater@gmx.net>
2015-10-15 11:10   ` Dave Cramer <pg@fastcrypt.com>
2015-10-15 20:47     ` Dave Cramer <pg@fastcrypt.com>
2015-10-15 21:17       ` Markus KARG <markus@headcrashing.eu>
2015-10-15 21:39       ` Thomas Kellerer <spam_eater@gmx.net>
2015-10-15 21:53         ` Dave Cramer <pg@fastcrypt.com>
2015-10-15 21:57           ` Kevin Grittner <kgrittn@ymail.com>
2015-10-15 22:02             ` Dave Cramer <pg@fastcrypt.com>
2015-10-15 22:04               ` Dave Cramer <pg@fastcrypt.com>
2015-10-15 22:19           ` Thomas Kellerer <spam_eater@gmx.net>
2015-10-15 22:49             ` Dave Cramer <pg@fastcrypt.com>
2015-10-16 06:50               ` Thomas Kellerer <spam_eater@gmx.net>
2015-10-16 07:01                 ` Mark Rotteveel <mark@lawinegevaar.nl>
2015-10-16 10:43                   ` Dave Cramer <pg@fastcrypt.com>
2015-10-16 17:04                     ` Mark Rotteveel <mark@lawinegevaar.nl>
2015-10-16 17:37                     ` Thomas Kellerer <spam_eater@gmx.net>
2015-10-16 06:57             ` Mark Rotteveel <mark@lawinegevaar.nl>
2015-10-16 06:51       ` Mark Rotteveel <mark@lawinegevaar.nl>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox