Allow access to Postgres partitioned tables#10403
Conversation
There was a problem hiding this comment.
Please use TestTable. Also, it would be nice to test SELECT query as well.
There was a problem hiding this comment.
The actual partition tables should be created before data inserts, so TestTable can't be used with rows.
Meanwhile, I added the SELECT tests with explicit CREATE and INSERT statements
There was a problem hiding this comment.
TestTable allows creating tables without rows.
There was a problem hiding this comment.
Please don't upgrade the version here. You can introduce base test class and run tests on two versions likes BaseSqlServerConnectorSmokeTest.
There was a problem hiding this comment.
9.6 is already unsupported so I think it's the proper time to upgrade
There was a problem hiding this comment.
We would like to use old version here, so it should be 10.x if you want to upgrade. The version 10 is enough for testing partitioned tables as far as I know.
Also, please update postgresql.rst that has minimum required version.
b3aedc6 to
bc2ea1e
Compare
...n/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlConnectorTest.java
Outdated
Show resolved
Hide resolved
...n/trino-postgresql/src/test/java/io/trino/plugin/postgresql/TestPostgreSqlConnectorTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
I think timestamps are useful sometimes on CI - for example when a certain test appears slow or stuck.
There was a problem hiding this comment.
Agree, and that's why they added to the log in Postgres 10+
e4ec0e5 to
94936d2
Compare
Fixes trinodb#10400 Postgres Jdbc 42.2.14+ added a new PARTITIONED TABLE type that must be included in PgDatabaseMetaData.getTables function arguments to retrieve partitioned tables
94936d2 to
b59e4dd
Compare
| { | ||
| // Use the oldest supported PostgreSQL version | ||
| dockerContainer = new PostgreSQLContainer<>("postgres:9.6") | ||
| dockerContainer = new PostgreSQLContainer<>("postgres:10") |
|
if it's EOL'd, then it's fine. |
Fixes #10400
Postgres Jdbc
42.2.14+added a newPARTITIONED TABLEtype that must be included inPgDatabaseMetaData.getTablesfunction arguments to retrieve partitioned tables