pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
PostgreSQL JDBC 42.7.5 returns an unexpected catalog name
3+ messages / 3 participants
[nested] [flat]

* PostgreSQL JDBC 42.7.5 returns an unexpected catalog name
@ 2025-03-28 18:24 Vinhson Nguyen <Vinhson.Nguyen@ca.ibm.com>
  2025-03-29 16:21 ` Fwd: PostgreSQL JDBC 42.7.5 returns an unexpected catalog name Laurenz Albe <laurenz.albe@cybertec.at>
  2025-03-29 18:53 ` Re: PostgreSQL JDBC 42.7.5 returns an unexpected catalog name Andrew Dunstan <andrew@dunslane.net>
  0 siblings, 2 replies; 3+ messages in thread

From: Vinhson Nguyen @ 2025-03-28 18:24 UTC (permalink / raw)
  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 (application/octet-stream, 2.0K) download

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
^ permalink raw reply [nested|flat] 3+ messages in thread

* Fwd: PostgreSQL JDBC 42.7.5 returns an unexpected catalog name
  2025-03-28 18:24 PostgreSQL JDBC 42.7.5 returns an unexpected catalog name Vinhson Nguyen <Vinhson.Nguyen@ca.ibm.com>
@ 2025-03-29 16:21 ` Laurenz Albe <laurenz.albe@cybertec.at>
  1 sibling, 0 replies; 3+ messages in thread

From: Laurenz Albe @ 2025-03-29 16:21 UTC (permalink / raw)
  To: Vinhson.Nguyen@ca.ibm.com; pgsql-jdbc@lists.postgresql.org; +Cc: ca_data_access_external@wwpdl.vnet.ibm.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
^ permalink raw reply [nested|flat] 3+ messages in thread

* Re: PostgreSQL JDBC 42.7.5 returns an unexpected catalog name
  2025-03-28 18:24 PostgreSQL JDBC 42.7.5 returns an unexpected catalog name Vinhson Nguyen <Vinhson.Nguyen@ca.ibm.com>
@ 2025-03-29 18:53 ` Andrew Dunstan <andrew@dunslane.net>
  1 sibling, 0 replies; 3+ messages in thread

From: Andrew Dunstan @ 2025-03-29 18:53 UTC (permalink / raw)
  To: Vinhson Nguyen <Vinhson.Nguyen@ca.ibm.com>; 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>


On 2025-03-28 Fr 2:24 PM, Vinhson Nguyen wrote:
> 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.


You should probably raise this here: 
<https://github.com/pgjdbc/pgjdbc/issues;


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com






^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-03-29 18:53 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-03-28 18:24 PostgreSQL JDBC 42.7.5 returns an unexpected catalog name Vinhson Nguyen <Vinhson.Nguyen@ca.ibm.com>
2025-03-29 16:21 ` Laurenz Albe <laurenz.albe@cybertec.at>
2025-03-29 18:53 ` Andrew Dunstan <andrew@dunslane.net>

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