Re: Postgres 10 partitioned tables

From: "Lussier, Denis" <denisl(at)bigsql(dot)com>
To: Dave Cramer <pg(at)fastcrypt(dot)com>
Cc: Thomas Kellerer <spam_eater(at)gmx(dot)net>, List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: Postgres 10 partitioned tables
Date: 2017-05-15 12:08:24
Message-ID: CAHKhnVX8oirr8J1D-fvr-UEdEdDTsbj8kJNMxLpwn_CNmyvE1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

IMHO, it's best to let the generic getTables() simply return all of the
tables. Front end tools that need to do special things with different
types of tables need to use PG specific meta data anyway.

--Luss

On Sun, May 14, 2017 at 7:39 AM, Dave Cramer <pg(at)fastcrypt(dot)com> wrote:

> Thomas,
>
> thanks for this !
>
> As for the answer to your question. I have no idea what to do with them.
>
> Dave Cramer
>
> davec(at)postgresintl(dot)com
> www.postgresintl.com
>
> On 13 May 2017 at 07:09, Thomas Kellerer <spam_eater(at)gmx(dot)net> wrote:
>
>> The current JDBC driver returns no information about the new partitioned
>> tables in the upcoming Postgres 10.
>> This is caused by the fact that partitioned tables have a new
>> pg_class.relkind value: 'p'
>>
>> I have attached a simple patch that fixes the obvious problem that
>> partitioned tables are not returned by getTables() and no column
>> information is returned from getColumns().
>>
>> The patch essentially treats relkind 'r' and 'p' the same because I think
>> the driver should not make a distinction between regular tables and
>> partitioned tables.
>>
>> But I think the bigger is: what do do with the partitions themselves?
>>
>> Technically they are tables, but I think it would make sense to hide them
>> and let frontend tools deal with displaying partitions belonging to a table
>> (this is e.g. how Oracle does it).
>>
>> However, psql displays them as regular tables just like with the "old"
>> inheritance partitions, so that would probably cause some confusion if
>> getTables() did not return those tables.
>>
>>
>> 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 Jorge Solorzano 2017-05-16 14:55:38 [pgjdbc/pgjdbc] 902286: test: yet another rename to use "lsn" not "locatio...
Previous Message Dave Cramer 2017-05-14 11:39:00 Re: Postgres 10 partitioned tables