Skip to content

Commit

Permalink
pgjdbc: Adjust test for updates to conn.getMetaData().getCatalogs()
Browse files Browse the repository at this point in the history
As before, the inquiry of the available catalogs returned `doc` on the
first slot.

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

  SELECT DISTINCT table_catalog FROM information_schema.tables 

This item on the upstream release notes seems to be relevant:

  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 10, 2024
1 parent 318bdf0 commit b435847
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ 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"));
// Returns `crate` as of pgjdbc 42.7.0. It returned `doc` before.
assertThat(result.getString(1), is("crate"));
}
}

Expand Down

0 comments on commit b435847

Please sign in to comment.