Message-ID: From: "avinashyn (@avinashyn)" To: "pgjdbc/pgjdbc" Date: Fri, 31 Jan 2025 09:14:32 +0000 Subject: [pgjdbc/pgjdbc] issue #3504: Wrong schemas fetched for a given catalog as input List-Id: X-GitHub-Author-Id: 197239062 X-GitHub-Author-Login: avinashyn X-GitHub-Issue: 3504 X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: open X-GitHub-Type: issue X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/issues/3504 Content-Type: text/plain; charset=utf-8 I am using a simple JDBC code to connect to postgres database. This is the jdbc url: **jdbc:postgresql://host:port/pg1** Here, "pg1" is the database name. Issue 1: Expectation is that **connection.getMetaData().getCatalogs()** sends only pg1 in the response as that is the one passed in JDBC url but it fetches all the catalogs present in the DB. Issue2 **connection.setCatalog("pg1"); connection.getMetaData().getSchemas()** --> should fetch only the schemas present in catalog 'pg1' but it fetches schemas of other catalogs as well. Please note that this issue is happening only in **postgresql-42.7.4.jar** whereas the previous version **postgresql-42.6.0.jar** works as expected.