-
Notifications
You must be signed in to change notification settings - Fork 656
Description
Methods
ResultSetMetaData::getColumnDisplaySizeResultSetMetaData::getPrecisionResultSetMetaData::getScale
For different column types like Types.INTEGER, Types.BIGINT, Types.VARCHAR often return 0 or Integer.MAX_VALUE instead of meaningful values.
This is a proposal to revisit this metadata methods and return meaningful values based on SQL-type.
E.g. for Types.VARCHAR ::getColumnDisplaySize result should be equal to ::getPrecision result.
E.g. for Types.INTEGER ::getPrecision result might be equal to 10 instead of current 0 (10 decimal digits max - PostgreSQL's approach).
E.g. for Types.INTEGER ::getColumnDisplaySize result might be equal to 11 instead of current Integer.MAX_VALUE (10 digits + potential minus sign - PostgreSQL's approach).
E.g. for Types.BIGINT ::getPrecision result might be equal to 19 instead of current 0 (19 decimal digits max - PostgreSQL's approach).
E.g. for Types.BIGINT ::getColumnDisplaySize result might be equal to 20 instead of current Integer.MAX_VALUE (19 digits + potential minus sign - PostgreSQL's approach).