pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Vinhson.Nguyen@ca.ibm.com
To: pgsql-jdbc@lists.postgresql.org
Cc: ca_data_access_external@wwpdl.vnet.ibm.com
Subject: Fwd: PostgreSQL JDBC 42.7.5 returns an unexpected catalog name
Date: Sat, 29 Mar 2025 17:21:09 +0100
Message-ID: <c35e2f5f2f1a9419d2bcef14cced3e12335972e3.camel@cybertec.at> (raw)
References: <DM6PR15MB4107ADBFB245342C6A6AA03FB4A02@DM6PR15MB4107.namprd15.prod.outlook.com>

I think this belongs here.

-------- Forwarded Message --------
From: Vinhson Nguyen <Vinhson.Nguyen@ca.ibm.com>
To: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Cc: ca_data_access_external@wwpdl.vnet.ibm.com <ca_data_access_external@wwpdl.vnet.ibm.com>

1) Problem Description:  
When upgrading our application to a new PostgreSQL JDBC driver 42.7.5 (from 42.7.4), we got an expected catalog name in the result set returned by DatabaseMetadata.getSchemas().

Expected catalog name:  null (42.7.4) 
Unexpected catalog name:  dbcert (42.7.5)

2) Connection Info:
URL used:
jdbc:postgresql://cteds721.fyre.ibm.com:54172/dbcert

Driver name/Version:
org.postgresql.Driver/postgresql-42.7.5.jar

userID/pw: dbcert1/***********

3) Attachements:
a) PG_JDBC_42_7_4.PNG:  Screenshot showing an expected catalog name (null) with driver version 42.7.4.
b) PG_JDBC_42_7_5.PNG:  Screenshot showing an unexpected catalog name (dbcert) with driver version 42.7.5.
c) ImportTest.java:  Java test program used in (a) and (b).

If you need any additional details, please let me know.

Thank you in advance!
Vinhson Nguyen

Attachments:

ImportTest.java (text/x-java, 1.9K) download package TD; import java.io.FileWriter; import java.io.IOException; import java.sql.Connection; import java.sql.DatabaseMetaData; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; public class ImportTest { public static void main(String[] args) { System.out.println("\nStarting main ImportTest... "); FileWriter fw = null; String outputFileName = "C:\\temp\\mdOutput.txt"; try { fw = new FileWriter(outputFileName, false); } catch (IOException e) { System.out.println(e); } Connection conn = null; conn = connectDB(); // Processing metadata try { DatabaseMetaData dmd = conn.getMetaData(); System.out.println("\ngetDriverName = " + dmd.getDriverName()); System.out.println("\ngetDriverVersion = " + dmd.getDriverVersion()); System.out.println("\ngetDatabaseProductName = " + dmd.getDatabaseProductName()); System.out.println("\ngetDatabaseProductVersion = " + dmd.getDatabaseProductVersion()); ResultSet schemas = dmd.getSchemas(); while (schemas.next()) { String schemaName = schemas.getString(1); String catName = schemas.getString(2); System.out.println("\ncatalog = " + catName + " schema = " + schemaName); } } catch (SQLException e) { System.out.println(e); } try { conn.close(); } catch (SQLException e) { System.out.println(e); } try { fw.close(); } catch (IOException ioe) { System.out.println(ioe); } System.out.println("\nEnding main ImportTest..."); } public static Connection connectDB() { Connection tdCon = null; try { Class.forName("org.postgresql.Driver"); String url = "jdbc:postgresql://cteds721.fyre.ibm.com:54172/dbcert"; String userID = "dbcert1"; String pw = "Cognos_1"; tdCon = DriverManager.getConnection(url, userID, pw); } catch (SQLException eSQL) { System.out.println(eSQL); } catch (Exception eClassNotFound) { System.out.println(eClassNotFound); } return tdCon; } }
PG_JDBC_42_7_4.PNG (image/png, 166.3K) download view image
PG_JDBC_42_7_5.PNG (image/png, 167.9K) download view image

view thread (3+ messages)  latest in thread

Message-ID: <c35e2f5f2f1a9419d2bcef14cced3e12335972e3.camel@cybertec.at>
Permalink:  ../c35e2f5f2f1a9419d2bcef14cced3e12335972e3.camel@cybertec.at/
Also on:    postgresql.org/message-id/c35e2f5f2f1a9419d2bcef14cced3e12335972e3.camel@cybertec.at

 · 

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: pgsql-bugs@postgresql.org
  Cc: laurenz.albe@cybertec.at, Vinhson.Nguyen@ca.ibm.com, pgsql-jdbc@lists.postgresql.org, ca_data_access_external@wwpdl.vnet.ibm.com
  Subject: Re: Fwd: PostgreSQL JDBC 42.7.5 returns an unexpected catalog name
  In-Reply-To: <c35e2f5f2f1a9419d2bcef14cced3e12335972e3.camel@cybertec.at>

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

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