Please read https://stackoverflow.com/help/minimal-reproducible-example
Describe the issue
The log statement
|
LOGGER.log(Level.FINEST, "querying SQL typecode for pg type oid '{0}'", intOidToLong(typeOid)); |
incorrectly quotes the "{0}" parameter. It needs doubled single quotes, otherwise the parameter is not replaced.
Driver Version?
42.5.0
Java Version?
OpenJDK 17
OS Version?
N/A
PostgreSQL Version?
N/A
To Reproduce
Steps to reproduce the behaviour:
- Enable FINEST log level for org.postgresql.jdbc.TypeInfoCache
- Run a query to trigger cache lookup
Expected behaviour
I expected the log entry to contain the valueof the oid.
The log did not replace the parameter and instead outputted "querying SQL typecode for pg type oid {0}"
Solution
Change the log parameter to use doubled single quotes around the parameter.
LOGGER.log(Level.FINEST, "querying SQL typecode for pg type oid ''{0}''", intOidToLong(typeOid));
Please read https://stackoverflow.com/help/minimal-reproducible-example
Describe the issue
The log statement
pgjdbc/pgjdbc/src/main/java/org/postgresql/jdbc/TypeInfoCache.java
Line 359 in aff581f
Driver Version?
42.5.0
Java Version?
OpenJDK 17
OS Version?
N/A
PostgreSQL Version?
N/A
To Reproduce
Steps to reproduce the behaviour:
Expected behaviour
I expected the log entry to contain the valueof the oid.
The log did not replace the parameter and instead outputted "querying SQL typecode for pg type oid {0}"
Solution
Change the log parameter to use doubled single quotes around the parameter.
LOGGER.log(Level.FINEST, "querying SQL typecode for pg type oid ''{0}''", intOidToLong(typeOid));