Skip to content

Conversation

@olavloite
Copy link
Collaborator

[Do not merge] Depends on googleapis/java-spanner#4223

Adds an unknownLength connection property that can be used to configure the length that the JDBC driver should return as the data type / column length when this is not known. Spanner does not return the (maximum) length of a column in ResultSetMetadata. This means that the JDBC driver does not know what the length is of the various columns in query results.

The value of unknownLength will be returned when the getPrecision and getColumnDisplaySize methods of ResultSetMetaData are called.

This connection property aligns with the same connection parameter in the PostgreSQL JDBC driver: https://jdbc.postgresql.org/documentation/use/#connection-parameters

Adds an `unknownLength` connection property that can be used to configure the length that
the JDBC driver should return as the data type / column length when this is not known.
Spanner does not return the (maximum) length of a column in ResultSetMetadata. This means
that the JDBC driver does not know what the length is of the various columns in query results.

The value of `unknownLength` will be returned when the getPrecision and getColumnDisplaySize
methods of ResultSetMetaData are called.

This connection property aligns with the same connection parameter in the PostgreSQL JDBC driver:
https://jdbc.postgresql.org/documentation/use/#connection-parameters
@olavloite olavloite requested review from a team as code owners November 14, 2025 11:01
@olavloite olavloite added the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Nov 14, 2025
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: spanner Issues related to the googleapis/java-spanner-jdbc API. labels Nov 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: spanner Issues related to the googleapis/java-spanner-jdbc API. do not merge Indicates a pull request not ready for merge, due to either quality or timing. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants