Skip to content

Commit

Permalink
[apache#1736] feat(postgresql): Support PostgreSQL index.
Browse files Browse the repository at this point in the history
  • Loading branch information
Clearvive authored and Clearvive committed Feb 1, 2024
1 parent 204ae9a commit 862ac70
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ protected List<Index> getIndexes(String databaseName, String tableName, Database
ResultSet indexInfo = getIndexInfo(databaseName, tableName, metaData);
while (indexInfo.next()) {
String indexName = indexInfo.getString("INDEX_NAME");
// The primary key is also the unique key, so we need to filter the primary key here.
if (!indexInfo.getBoolean("NON_UNIQUE") && !primaryIndexNames.contains(indexName)) {
jdbcIndexBeans.add(
new JdbcIndexBean(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -589,8 +589,8 @@ void testCreateTableIndex() {
Indexes.unique("u2_key", new String[][] {{"col_3"}, {"col_4"}}),
Indexes.unique("u3_key", new String[][] {{"col_5"}, {"col_4"}}),
Indexes.unique("u4_key", new String[][] {{"col_2"}, {"col_3"}, {"col_4"}}),
Indexes.unique("u5_key", new String[][] {{"col_2"}, {"col_3"}, {"col_4"}}),
Indexes.unique("u6_key", new String[][] {{"col_1"}, {"col_2"}, {"col_3"}, {"col_4"}}),
Indexes.unique("u5_key", new String[][] {{"col_3"}, {"col_2"}, {"col_4"}}),
Indexes.unique("u6_key", new String[][] {{"col_3"}, {"col_4"}, {"col_1"}, {"col_2"}}),
};

NameIdentifier tableIdentifier =
Expand Down

0 comments on commit 862ac70

Please sign in to comment.