pg.ddx.io pgsql-jdbc@postgresql.org mailing list archive
help / color / mirror / Atom feedPostgres 10 partitioned tables
9+ messages / 4 participants
[nested] [flat]
* Postgres 10 partitioned tables
@ 2017-05-13 11:09 Thomas Kellerer <spam_eater@gmx.net>
2017-05-14 11:39 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
2017-05-17 19:42 ` Re: Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-07-10 06:52 ` Re: Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
0 siblings, 3 replies; 9+ messages in thread
From: Thomas Kellerer @ 2017-05-13 11:09 UTC (permalink / raw)
To: 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() 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
Attachments:
partioned_tables.diff (text/plain, 4.9K) download
diff --git a/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java b/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
index 5df0184..37b3da3 100644
--- a/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
+++ b/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
@@ -1198,6 +1198,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " END "
+ " ELSE CASE c.relkind "
+ " WHEN 'r' THEN 'TEMPORARY TABLE' "
+ + " WHEN 'p' THEN 'TEMPORARY TABLE' "
+ " WHEN 'i' THEN 'TEMPORARY INDEX' "
+ " WHEN 'S' THEN 'TEMPORARY SEQUENCE' "
+ " WHEN 'v' THEN 'TEMPORARY VIEW' "
@@ -1206,6 +1207,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " END "
+ " WHEN false THEN CASE c.relkind "
+ " WHEN 'r' THEN 'TABLE' "
+ + " WHEN 'p' THEN 'TABLE' "
+ " WHEN 'i' THEN 'INDEX' "
+ " WHEN 'S' THEN 'SEQUENCE' "
+ " WHEN 'v' THEN 'VIEW' "
@@ -1255,8 +1257,8 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
Map<String, String> ht = new HashMap<String, String>();
tableTypeClauses.put("TABLE", ht);
ht.put("SCHEMAS",
- "c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema'");
- ht.put("NOSCHEMAS", "c.relkind = 'r' AND c.relname !~ '^pg_'");
+ "c.relkind IN ('r','p') AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema'");
+ ht.put("NOSCHEMAS", "c.relkind IN ('r','p') AND c.relname !~ '^pg_'");
ht = new HashMap<String, String>();
tableTypeClauses.put("VIEW", ht);
ht.put("SCHEMAS",
@@ -1303,8 +1305,8 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
"c.relkind = 'v' AND c.relname ~ '^pg_' AND c.relname !~ '^pg_toast_' AND c.relname !~ '^pg_temp_'");
ht = new HashMap<String, String>();
tableTypeClauses.put("TEMPORARY TABLE", ht);
- ht.put("SCHEMAS", "c.relkind = 'r' AND n.nspname ~ '^pg_temp_' ");
- ht.put("NOSCHEMAS", "c.relkind = 'r' AND c.relname ~ '^pg_temp_' ");
+ ht.put("SCHEMAS", "c.relkind IN ('p','r') AND n.nspname ~ '^pg_temp_' ");
+ ht.put("NOSCHEMAS", "c.relkind IN ('p','r') AND c.relname ~ '^pg_temp_' ");
ht = new HashMap<String, String>();
tableTypeClauses.put("TEMPORARY INDEX", ht);
ht.put("SCHEMAS", "c.relkind = 'i' AND n.nspname ~ '^pg_temp_' ");
@@ -1444,7 +1446,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) "
+ " LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') "
+ " LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') "
- + " WHERE c.relkind in ('r','v','f','m') and a.attnum > 0 AND NOT a.attisdropped ";
+ + " WHERE c.relkind in ('p','r','v','f','m') and a.attnum > 0 AND NOT a.attisdropped ";
if (schemaPattern != null && !schemaPattern.isEmpty()) {
sql += " AND n.nspname LIKE " + escapeQuotes(schemaPattern);
@@ -1658,7 +1660,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c, pg_catalog.pg_roles r "
+ " WHERE c.relnamespace = n.oid "
+ " AND c.relowner = r.oid "
- + " AND c.relkind = 'r' ";
+ + " AND c.relkind IN ('p','r') ";
if (schemaPattern != null && !schemaPattern.isEmpty()) {
sql += " AND n.nspname LIKE " + escapeQuotes(schemaPattern);
@@ -1786,6 +1788,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
sqlpriv = "INSERT";
break;
case 'r':
+ case 'p':
sqlpriv = "SELECT";
break;
case 'w':
@@ -2044,6 +2047,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " WHEN 'n' THEN " + DatabaseMetaData.importedKeySetNull
+ " WHEN 'd' THEN " + DatabaseMetaData.importedKeySetDefault
+ " WHEN 'r' THEN " + DatabaseMetaData.importedKeyRestrict
+ + " WHEN 'p' THEN " + DatabaseMetaData.importedKeyRestrict
+ " WHEN 'a' THEN " + DatabaseMetaData.importedKeyNoAction
+ " ELSE NULL END AS UPDATE_RULE, "
+ "CASE con.confdeltype "
@@ -2051,6 +2055,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " WHEN 'n' THEN " + DatabaseMetaData.importedKeySetNull
+ " WHEN 'd' THEN " + DatabaseMetaData.importedKeySetDefault
+ " WHEN 'r' THEN " + DatabaseMetaData.importedKeyRestrict
+ + " WHEN 'p' THEN " + DatabaseMetaData.importedKeyRestrict
+ " WHEN 'a' THEN " + DatabaseMetaData.importedKeyNoAction
+ " ELSE NULL END AS DELETE_RULE, "
+ "con.conname AS FK_NAME, pkic.relname AS PK_NAME, "
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres 10 partitioned tables
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
@ 2017-05-14 11:39 ` Dave Cramer <pg@fastcrypt.com>
2017-05-15 12:08 ` Re: Postgres 10 partitioned tables Lussier, Denis <denisl@bigsql.com>
2 siblings, 1 reply; 9+ messages in thread
From: Dave Cramer @ 2017-05-14 11:39 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc
Thomas,
thanks for this !
As for the answer to your question. I have no idea what to do with them.
Dave Cramer
davec@postgresintl.com
www.postgresintl.com
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
>
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres 10 partitioned tables
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-14 11:39 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
@ 2017-05-15 12:08 ` Lussier, Denis <denisl@bigsql.com>
0 siblings, 0 replies; 9+ messages in thread
From: Lussier, Denis @ 2017-05-15 12:08 UTC (permalink / raw)
To: Dave Cramer <pg@fastcrypt.com>; +Cc: Thomas Kellerer <spam_eater@gmx.net>; 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@fastcrypt.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@postgresintl.com
> www.postgresintl.com
>
> 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
>>
>>
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres 10 partitioned tables
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
@ 2017-05-17 19:42 ` Thomas Kellerer <spam_eater@gmx.net>
2017-05-18 10:36 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
2 siblings, 1 reply; 9+ messages in thread
From: Thomas Kellerer @ 2017-05-17 19:42 UTC (permalink / raw)
To: pgsql-jdbc
I have updated the patch to also include proper handling of the new identity columns. getColumns() now returns YES for IS_AUTOINCREMENT
I tried to find out how to do this via Github, but the Github manual only says I need to push my commit to a branch, but even if I create a local tracking branch I can't push that, so I am a bit lost (never worked with Github before and git itself doesn't like me anyway)
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Attachments:
pg10.diff (text/plain, 6.3K) download
diff --git a/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java b/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
index 5df0184..a6365d3 100644
--- a/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
+++ b/pgjdbc/src/main/java/org/postgresql/jdbc/PgDatabaseMetaData.java
@@ -1198,6 +1198,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " END "
+ " ELSE CASE c.relkind "
+ " WHEN 'r' THEN 'TEMPORARY TABLE' "
+ + " WHEN 'p' THEN 'TEMPORARY TABLE' "
+ " WHEN 'i' THEN 'TEMPORARY INDEX' "
+ " WHEN 'S' THEN 'TEMPORARY SEQUENCE' "
+ " WHEN 'v' THEN 'TEMPORARY VIEW' "
@@ -1206,6 +1207,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " END "
+ " WHEN false THEN CASE c.relkind "
+ " WHEN 'r' THEN 'TABLE' "
+ + " WHEN 'p' THEN 'TABLE' "
+ " WHEN 'i' THEN 'INDEX' "
+ " WHEN 'S' THEN 'SEQUENCE' "
+ " WHEN 'v' THEN 'VIEW' "
@@ -1255,8 +1257,8 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
Map<String, String> ht = new HashMap<String, String>();
tableTypeClauses.put("TABLE", ht);
ht.put("SCHEMAS",
- "c.relkind = 'r' AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema'");
- ht.put("NOSCHEMAS", "c.relkind = 'r' AND c.relname !~ '^pg_'");
+ "c.relkind IN ('r','p') AND n.nspname !~ '^pg_' AND n.nspname <> 'information_schema'");
+ ht.put("NOSCHEMAS", "c.relkind IN ('r','p') AND c.relname !~ '^pg_'");
ht = new HashMap<String, String>();
tableTypeClauses.put("VIEW", ht);
ht.put("SCHEMAS",
@@ -1303,8 +1305,8 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
"c.relkind = 'v' AND c.relname ~ '^pg_' AND c.relname !~ '^pg_toast_' AND c.relname !~ '^pg_temp_'");
ht = new HashMap<String, String>();
tableTypeClauses.put("TEMPORARY TABLE", ht);
- ht.put("SCHEMAS", "c.relkind = 'r' AND n.nspname ~ '^pg_temp_' ");
- ht.put("NOSCHEMAS", "c.relkind = 'r' AND c.relname ~ '^pg_temp_' ");
+ ht.put("SCHEMAS", "c.relkind IN ('p','r') AND n.nspname ~ '^pg_temp_' ");
+ ht.put("NOSCHEMAS", "c.relkind IN ('p','r') AND c.relname ~ '^pg_temp_' ");
ht = new HashMap<String, String>();
tableTypeClauses.put("TEMPORARY INDEX", ht);
ht.put("SCHEMAS", "c.relkind = 'i' AND n.nspname ~ '^pg_temp_' ");
@@ -1435,6 +1437,11 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
sql += "a.attnum,";
}
+ if (connection.haveMinimumServerVersion(ServerVersion.v10)) {
+ sql += "nullif(a.attidentity, '') as attidentity,";
+ } else {
+ sql += "null as attidentity,";
+ }
sql += "pg_catalog.pg_get_expr(def.adbin, def.adrelid) AS adsrc,dsc.description,t.typbasetype,t.typtype "
+ " FROM pg_catalog.pg_namespace n "
+ " JOIN pg_catalog.pg_class c ON (c.relnamespace = n.oid) "
@@ -1444,7 +1451,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " LEFT JOIN pg_catalog.pg_description dsc ON (c.oid=dsc.objoid AND a.attnum = dsc.objsubid) "
+ " LEFT JOIN pg_catalog.pg_class dc ON (dc.oid=dsc.classoid AND dc.relname='pg_class') "
+ " LEFT JOIN pg_catalog.pg_namespace dn ON (dc.relnamespace=dn.oid AND dn.nspname='pg_catalog') "
- + " WHERE c.relkind in ('r','v','f','m') and a.attnum > 0 AND NOT a.attisdropped ";
+ + " WHERE c.relkind in ('p','r','v','f','m') and a.attnum > 0 AND NOT a.attisdropped ";
if (schemaPattern != null && !schemaPattern.isEmpty()) {
sql += " AND n.nspname LIKE " + escapeQuotes(schemaPattern);
@@ -1503,6 +1510,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
}
}
}
+ String identity = rs.getString("attidentity");
int decimalDigits = connection.getTypeInfo().getScale(typeOid, typeMod);
int columnSize = connection.getTypeInfo().getPrecision(typeOid, typeMod);
@@ -1541,7 +1549,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
: connection.encodeString(Integer.toString(connection.getTypeInfo().getSQLType(baseTypeOid))); // SOURCE_DATA_TYPE
String autoinc = "NO";
- if (defval != null && defval.contains("nextval(")) {
+ if (defval != null && defval.contains("nextval(") || identity != null) {
autoinc = "YES";
}
tuple[22] = connection.encodeString(autoinc);
@@ -1658,7 +1666,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " FROM pg_catalog.pg_namespace n, pg_catalog.pg_class c, pg_catalog.pg_roles r "
+ " WHERE c.relnamespace = n.oid "
+ " AND c.relowner = r.oid "
- + " AND c.relkind = 'r' ";
+ + " AND c.relkind IN ('p','r') ";
if (schemaPattern != null && !schemaPattern.isEmpty()) {
sql += " AND n.nspname LIKE " + escapeQuotes(schemaPattern);
@@ -1786,6 +1794,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
sqlpriv = "INSERT";
break;
case 'r':
+ case 'p':
sqlpriv = "SELECT";
break;
case 'w':
@@ -2044,6 +2053,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " WHEN 'n' THEN " + DatabaseMetaData.importedKeySetNull
+ " WHEN 'd' THEN " + DatabaseMetaData.importedKeySetDefault
+ " WHEN 'r' THEN " + DatabaseMetaData.importedKeyRestrict
+ + " WHEN 'p' THEN " + DatabaseMetaData.importedKeyRestrict
+ " WHEN 'a' THEN " + DatabaseMetaData.importedKeyNoAction
+ " ELSE NULL END AS UPDATE_RULE, "
+ "CASE con.confdeltype "
@@ -2051,6 +2061,7 @@ public class PgDatabaseMetaData implements DatabaseMetaData {
+ " WHEN 'n' THEN " + DatabaseMetaData.importedKeySetNull
+ " WHEN 'd' THEN " + DatabaseMetaData.importedKeySetDefault
+ " WHEN 'r' THEN " + DatabaseMetaData.importedKeyRestrict
+ + " WHEN 'p' THEN " + DatabaseMetaData.importedKeyRestrict
+ " WHEN 'a' THEN " + DatabaseMetaData.importedKeyNoAction
+ " ELSE NULL END AS DELETE_RULE, "
+ "con.conname AS FK_NAME, pkic.relname AS PK_NAME, "
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres 10 partitioned tables
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-17 19:42 ` Re: Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
@ 2017-05-18 10:36 ` Dave Cramer <pg@fastcrypt.com>
2017-05-18 13:38 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
0 siblings, 1 reply; 9+ messages in thread
From: Dave Cramer @ 2017-05-18 10:36 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc
Thomas,
Thanks!
So for github you need to clone the repo into your own. Then add your repo
as a remote to the pgjdbc repo. Then you can push to your repo on a
different branch and create pull requests.
Dave Cramer
davec@postgresintl.com
www.postgresintl.com
On 17 May 2017 at 15:42, Thomas Kellerer <spam_eater@gmx.net> wrote:
> I have updated the patch to also include proper handling of the new
> identity columns. getColumns() now returns YES for IS_AUTOINCREMENT
>
> I tried to find out how to do this via Github, but the Github manual only
> says I need to push my commit to a branch, but even if I create a local
> tracking branch I can't push that, so I am a bit lost (never worked with
> Github before and git itself doesn't like me anyway)
>
>
> --
> 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] 9+ messages in thread
* Re: Postgres 10 partitioned tables
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-17 19:42 ` Re: Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-18 10:36 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
@ 2017-05-18 13:38 ` Dave Cramer <pg@fastcrypt.com>
2017-05-18 14:56 ` Re: Postgres 10 partitioned tables Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
0 siblings, 1 reply; 9+ messages in thread
From: Dave Cramer @ 2017-05-18 13:38 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc
I've already done it https://github.com/pgjdbc/pgjdbc/pull/823
and added tests
Dave Cramer
davec@postgresintl.com
www.postgresintl.com
On 18 May 2017 at 06:36, Dave Cramer <pg@fastcrypt.com> wrote:
> Thomas,
>
> Thanks!
>
> So for github you need to clone the repo into your own. Then add your repo
> as a remote to the pgjdbc repo. Then you can push to your repo on a
> different branch and create pull requests.
>
> Dave Cramer
>
> davec@postgresintl.com
> www.postgresintl.com
>
> On 17 May 2017 at 15:42, Thomas Kellerer <spam_eater@gmx.net> wrote:
>
>> I have updated the patch to also include proper handling of the new
>> identity columns. getColumns() now returns YES for IS_AUTOINCREMENT
>>
>> I tried to find out how to do this via Github, but the Github manual only
>> says I need to push my commit to a branch, but even if I create a local
>> tracking branch I can't push that, so I am a bit lost (never worked with
>> Github before and git itself doesn't like me anyway)
>>
>>
>> --
>> 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] 9+ messages in thread
* Re: Postgres 10 partitioned tables
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-17 19:42 ` Re: Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-18 10:36 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
2017-05-18 13:38 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
@ 2017-05-18 14:56 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2017-05-18 17:02 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
0 siblings, 1 reply; 9+ messages in thread
From: Vladimir Sitnikov @ 2017-05-18 14:56 UTC (permalink / raw)
To: Thomas Kellerer <spam_eater@gmx.net>; +Cc: pgsql-jdbc; Dave Cramer <pg@fastcrypt.com>
Thomas>On 17 May 2017 at 15:42, Thomas Kellerer <spam_eater@gmx.net> wrote:
Thomas>I have updated the patch
Thanks for the patch, however it looks a bit odd when order of 'r','p'
differs from line to line.
Can you please use some consistent order for r and p?
Vladimir
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres 10 partitioned tables
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-17 19:42 ` Re: Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-18 10:36 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
2017-05-18 13:38 ` Re: Postgres 10 partitioned tables Dave Cramer <pg@fastcrypt.com>
2017-05-18 14:56 ` Re: Postgres 10 partitioned tables Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
@ 2017-05-18 17:02 ` Dave Cramer <pg@fastcrypt.com>
0 siblings, 0 replies; 9+ messages in thread
From: Dave Cramer @ 2017-05-18 17:02 UTC (permalink / raw)
To: Vladimir Sitnikov <sitnikov.vladimir@gmail.com>; +Cc: Thomas Kellerer <spam_eater@gmx.net>; pgsql-jdbc
I've reordered them in my PR
Dave Cramer
davec@postgresintl.com
www.postgresintl.com
On 18 May 2017 at 10:56, Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
wrote:
> Thomas>On 17 May 2017 at 15:42, Thomas Kellerer <spam_eater@gmx.net>
> wrote:
> Thomas>I have updated the patch
>
> Thanks for the patch, however it looks a bit odd when order of 'r','p'
> differs from line to line.
> Can you please use some consistent order for r and p?
>
> Vladimir
>
>
^ permalink raw reply [nested|flat] 9+ messages in thread
* Re: Postgres 10 partitioned tables
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
@ 2017-07-10 06:52 ` Thomas Kellerer <spam_eater@gmx.net>
2 siblings, 0 replies; 9+ messages in thread
From: Thomas Kellerer @ 2017-07-10 06:52 UTC (permalink / raw)
To: pgsql-jdbc
Thomas Kellerer schrieb am 13.05.2017 um 13:09:
> 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.
Turns out that this is being discussed for psql as well:
https://www.postgresql.org/message-id/flat/6d0e4eb7-c2a9-c4cd-f9bc-1a1722f878d2%40catalyst.net.nz#6d...
Including a suggestion (patch) display partitions with a different type in the \d output.
If that patch gets accepted/committed, maybe the driver should be adjusted to also return "PARTITION" as the table type instead of TABLE.
That might however, break applications that know how to deal with TABLEs but have no notion that a PARTITION can be treated as that as well.
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] 9+ messages in thread
end of thread, other threads:[~2017-07-10 06:52 UTC | newest]
Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-05-13 11:09 Postgres 10 partitioned tables Thomas Kellerer <spam_eater@gmx.net>
2017-05-14 11:39 ` Dave Cramer <pg@fastcrypt.com>
2017-05-15 12:08 ` Lussier, Denis <denisl@bigsql.com>
2017-05-17 19:42 ` Thomas Kellerer <spam_eater@gmx.net>
2017-05-18 10:36 ` Dave Cramer <pg@fastcrypt.com>
2017-05-18 13:38 ` Dave Cramer <pg@fastcrypt.com>
2017-05-18 14:56 ` Vladimir Sitnikov <sitnikov.vladimir@gmail.com>
2017-05-18 17:02 ` Dave Cramer <pg@fastcrypt.com>
2017-07-10 06:52 ` Thomas Kellerer <spam_eater@gmx.net>
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