Re: [JDBC] Postgres 10 partitioned tables

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: [JDBC] Postgres 10 partitioned tables
Дата
Msg-id CADK3HHK-DjvRL4KJHV=MX=A2G9xAuPdkhmSc8k+O-ETghf9u1Q@mail.gmail.com
обсуждение исходный текст
Ответ на [JDBC] Postgres 10 partitioned tables  (Thomas Kellerer <spam_eater@gmx.net>)
Ответы Re: [JDBC] Postgres 10 partitioned tables
Re: Postgres 10 partitioned tables
Список pgsql-jdbc
Thomas,

thanks for this !

As for the answer to your question. I have no idea what to do with them.


On 13 May 2017 at 07:09, Thomas Kellerer <spam_eater@gmx.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@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc


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

Предыдущее
От: Thomas Kellerer
Дата:
Сообщение: [JDBC] Postgres 10 partitioned tables
Следующее
От: "Lussier, Denis"
Дата:
Сообщение: Re: [JDBC] Postgres 10 partitioned tables