[#4065] Exception when loading array results from plain SQL queries into a Record

This commit is contained in:
lukaseder 2015-02-17 10:49:14 +01:00
parent faaae0414d
commit 2b06039e50

View File

@ -643,15 +643,17 @@ public class DefaultDataType<T> implements DataType<T> {
}
// UDT data types and others are registered using DEFAULT
if (result == null) {
if (result == null)
result = TYPES_BY_NAME[SQLDialect.DEFAULT.ordinal()].get(typeName);
}
if (result == null) {
// [#366] Don't log a warning here. The warning is logged when
// catching the exception in jOOQ-codegen
// [#4065] PostgreSQL reports array types as _typename, e.g. _varchar
if (result == null && dialect.family() == SQLDialect.POSTGRES && typeName.charAt(0) == '_')
result = getDataType(dialect, typeName.substring(1)).getArrayDataType();
// [#366] Don't log a warning here. The warning is logged when
// catching the exception in jOOQ-codegen
if (result == null)
throw new SQLDialectNotSupportedException("Type " + typeName + " is not supported in dialect " + dialect, false);
}
return result;
}