Skip to content

Commit

Permalink
fix: Partitioned indexes were not found fixes (#2078) (#2087) (#2299)
Browse files Browse the repository at this point in the history
* fix: Partitioned indexes were not found fixes (#2078)

Co-authored-by: Dave Cramer <davecramer@gmail.com>
  • Loading branch information
jorsol and davecramer committed Oct 12, 2021
1 parent a4dad3c commit 8b1f95e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1390,12 +1390,16 @@ public void testPartitionedTables() throws SQLException {
try {
stmt = con.createStatement();
stmt.execute(
"CREATE TABLE measurement (logdate date not null ,peaktemp int,unitsales int ) PARTITION BY RANGE (logdate);");
"CREATE TABLE measurement (logdate date not null primary key,peaktemp int,unitsales int ) PARTITION BY RANGE (logdate);");
DatabaseMetaData dbmd = con.getMetaData();
ResultSet rs = dbmd.getTables("", "", "measurement", new String[]{"PARTITIONED TABLE"});
assertTrue(rs.next());
assertEquals("measurement", rs.getString("table_name"));
rs.close();
rs = dbmd.getPrimaryKeys("", "", "measurement");
assertTrue(rs.next());
assertEquals("measurement_pkey", rs.getString(6));

} finally {
if (stmt != null) {
stmt.execute("drop table if exists measurement");
Expand Down

1 comment on commit 8b1f95e

@davecramer
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting, this fails on older versions of Postgres

Please sign in to comment.