[jOOQ/jOOQ#19247] Reverse order of checks to speed things up

This commit is contained in:
Lukas Eder 2025-11-19 08:38:31 +01:00
parent ccea1d181b
commit c74a074037

View File

@ -304,11 +304,11 @@ public class DefaultDataTypeDefinition implements DataTypeDefinition {
// [#19247] In PostgreSQL, tables expose types that can be used as UDTs as well in SQL.
// Some RDBMS have multiple namespaces per object type, e.g. a domain S.D may conflict with a table S.D
return getDatabase().getDomain(schema, userType) == null
return getDatabase().getTable(schema, userType) != null
&& getDatabase().getDomain(schema, userType) == null
&& getDatabase().getEnum(schema, userType) == null
&& getDatabase().getUDT(schema, userType) == null
&& getDatabase().getArray(schema, userType) == null
&& getDatabase().getTable(schema, userType) != null;
&& getDatabase().getArray(schema, userType) == null;
}
@Override