[jOOQ/jOOQ#9958] Don't set precision / scale if not available

This commit is contained in:
Lukas Eder 2020-03-16 11:36:08 +01:00
parent fded3f189b
commit e23d3e8087

View File

@ -854,8 +854,13 @@ final class MetaImpl extends AbstractMeta {
type = DefaultDataType.getDataType(family(), typeName, precision, scale);
// JDBC doesn't distinguish between precision and length
type = type.precision(precision, scale);
type = type.length(precision);
if (type.hasPrecision() && type.hasScale())
type = type.precision(precision, scale);
else if (type.hasPrecision())
type = type.precision(precision);
else if (type.hasLength())
type = type.length(precision);
type = type.identity(isAutoIncrement);
if (nullable == DatabaseMetaData.columnNoNulls)