[#4065] Exception when loading array results from plain SQL queries into a Record
This commit is contained in:
parent
faaae0414d
commit
2b06039e50
@ -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;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user