New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When fetching a BOOLEAN data type for a column, this is identified as a BIT data type by java.sql.Types #3230
Comments
The JDBC specification uses Sadly this is a legacy behavior of the spec and we have to live with it, in other words, you need to change your check to Anyway, FTR, I opened a PR almost 7 years ago changing the data type returned to But this PR is not accepted as there is a marginal breaking change in code that depends on |
@jorsol thanks for answering. We should probably document that in the code as I didn't recall this detail
|
Whilst I understand the legacy of this (namely here upon investigation: https://www.postgresql.org/message-id/dm2umf$sga$1@sea.gmane.org and your previous issue), is there any documentation that explicitly calls this out? I don't think I see it here - https://jdbc.postgresql.org/documentation/query/ |
@ocracoke Apparently no documentation. We do welcome PR's |
Describe the issue
When parsing the column types from the ResultSetMetaData object returned by java.sql.ResultSet, BOOLEAN columns are being returned as BIT column types.
Driver Version?
42.5.0
Java Version?
OpenJDK 17
OS Version?
Windows 10
PostgreSQL Version?
15.4
To Reproduce
Use the below MVE to parse a BOOLEAN column and identify the type.
Expected behaviour
The below should return "This is a boolean"
The below currently returns "This is not a boolean"
Logs
N/A
MVE
The text was updated successfully, but these errors were encountered: