public inbox for [email protected]
help / color / mirror / Atom feedPostgreSQL 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 <[email protected]>
2025-03-29 16:21 ` Fwd: PostgreSQL JDBC 42.7.5 returns an unexpected catalog name Laurenz Albe <[email protected]>
2025-03-29 18:53 ` Re: PostgreSQL JDBC 42.7.5 returns an unexpected catalog name Andrew Dunstan <[email protected]>
0 siblings, 2 replies; 3+ messages in thread
From: Vinhson Nguyen @ 2025-03-28 18:24 UTC (permalink / raw)
To: [email protected] <[email protected]>; +Cc: [email protected] <[email protected]>
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:
[application/octet-stream] ImportTest.java (2.0K, 2-ImportTest.java)
download
[image/png] PG_JDBC_42_7_4.PNG (166.3K, 3-PG_JDBC_42_7_4.PNG)
download | view image
[image/png] PG_JDBC_42_7_5.PNG (167.9K, 4-PG_JDBC_42_7_5.PNG)
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 <[email protected]>
@ 2025-03-29 16:21 ` Laurenz Albe <[email protected]>
1 sibling, 0 replies; 3+ messages in thread
From: Laurenz Albe @ 2025-03-29 16:21 UTC (permalink / raw)
To: [email protected]; [email protected]; +Cc: [email protected]
I think this belongs here.
-------- Forwarded Message --------
From: Vinhson Nguyen <[email protected]>
To: [email protected] <[email protected]>
Cc: [email protected] <[email protected]>
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:
[text/x-java] ImportTest.java (1.9K, 2-ImportTest.java)
download | inline:
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;
}
}
[image/png] PG_JDBC_42_7_4.PNG (166.3K, 3-PG_JDBC_42_7_4.PNG)
download | view image
[image/png] PG_JDBC_42_7_5.PNG (167.9K, 4-PG_JDBC_42_7_5.PNG)
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 <[email protected]>
@ 2025-03-29 18:53 ` Andrew Dunstan <[email protected]>
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Dunstan @ 2025-03-29 18:53 UTC (permalink / raw)
To: Vinhson Nguyen <[email protected]>; [email protected] <[email protected]>; +Cc: [email protected] <[email protected]>
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 <[email protected]>
2025-03-29 16:21 ` Laurenz Albe <[email protected]>
2025-03-29 18:53 ` Andrew Dunstan <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox