[JDBC] Postgres 10 partitioned tables

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема [JDBC] Postgres 10 partitioned tables
Дата
Msg-id of6pgu$7kb$1@blaine.gmane.org
обсуждение исходный текст
Ответы Re: [JDBC] Postgres 10 partitioned tables  (Dave Cramer <pg@fastcrypt.com>)
Re: [JDBC] Postgres 10 partitioned tables  (Thomas Kellerer <spam_eater@gmx.net>)
Re: [JDBC] Postgres 10 partitioned tables  (Thomas Kellerer <spam_eater@gmx.net>)
Re: Postgres 10 partitioned tables  (Dave Cramer <pg@fastcrypt.com>)
Re: Postgres 10 partitioned tables  (Thomas Kellerer <spam_eater@gmx.net>)
Re: Postgres 10 partitioned tables  (Thomas Kellerer <spam_eater@gmx.net>)
Список pgsql-jdbc
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()
andno 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
betweenregular 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
partitionsbelonging 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
causesome confusion if getTables() did not return those tables. 


Thomas



Вложения

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

Предыдущее
От: Erko Hansar
Дата:
Сообщение: Re: [JDBC] ArrayIndexOutOfBoundsException from ByteConverter.int8when resolving generated keys
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: [JDBC] Postgres 10 partitioned tables