[#5872] <types/> cannot match user-defined types (e.g. PostGIS GEOMETRY)

This commit is contained in:
lukaseder 2017-07-14 16:36:29 +02:00
parent fc2b863285
commit db77c8addf

View File

@ -1309,7 +1309,14 @@ public abstract class AbstractDatabase implements Database {
&& ( definedType.getScale() != 0
|| !p.matcher(definedType.getType() + "(" + definedType.getPrecision() + ")").matches())
&& ( !p.matcher(definedType.getType() + "(" + definedType.getPrecision() + "," + definedType.getScale() + ")").matches() )
&& ( !p.matcher(definedType.getType() + "(" + definedType.getPrecision() + ", " + definedType.getScale() + ")").matches() )) {
&& ( !p.matcher(definedType.getType() + "(" + definedType.getPrecision() + ", " + definedType.getScale() + ")").matches() )
// [#5872] We should match user-defined types as well, in case of which the type might be reported
// as USER-DEFINED (in PostgreSQL)
&& ( StringUtils.isBlank(definedType.getUserType())
|| !p.matcher(definedType.getUserType()).matches()
&& !p.matcher(definedType.getQualifiedUserType().toString().replace("\"", "")).matches() )
) {
continue forcedTypeLoop;
}
}