pgjdbc/pgjdbc GitHub issues and pull requests (mirror)  
help / color / mirror / Atom feed
From: avinashyn (@avinashyn) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] issue #3504: Wrong schemas fetched for a given catalog as input
Date: Fri, 31 Jan 2025 09:14:32 +0000
Message-ID: <[email protected]> (raw)

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.



view thread (25+ messages)  latest in thread

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: github://pgjdbc/pgjdbc
  Cc: [email protected], [email protected]
  Subject: Re: [pgjdbc/pgjdbc] issue #3504: Wrong schemas fetched for a given catalog as input
  In-Reply-To: <<[email protected]>>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox