Skip to content

Commit

Permalink
pgjdbc: Adjust for new result from conn.getMetaData().getCatalogs()
Browse files Browse the repository at this point in the history
As before there was 

It looks actually correct now in 42.7, as `doc` is the schema, but not
the catalog. The SQL statement returns `crate`, not `doc`.

  SELECT DISTINCT table_catalog FROM information_schema.tables 

On the upstream release notes:

  feat: return all catalogs for getCatalogs metadata query closes
  ISSUE #2949 PR #2953

  -- https://jdbc.postgresql.org/changelogs/2023-11-20-42.7.0-release/
  • Loading branch information
amotl committed Jan 9, 2024
1 parent 5c102ca commit 4f39b3f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public void test_getCatalogs() throws Exception {
try (var conn = DriverManager.getConnection(URL)) {
var result = conn.getMetaData().getCatalogs();
assertThat(result.next(), is(true));
assertThat(result.getString(1), is("doc"));
assertThat(result.getString(1), is("crate"));
}
}

Expand Down

0 comments on commit 4f39b3f

Please sign in to comment.