Skip to content
/ pgjdbc Public
forked from pgjdbc/pgjdbc

Commit

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

* fix: Partitioned indexes were not found fixes (pgjdbc#2078)
  • Loading branch information
davecramer authored and jorsol committed Oct 12, 2021
1 parent a4dad3c commit 9e1bc0f
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

0 comments on commit 9e1bc0f

Please sign in to comment.