resolveOid

internal fun resolveOid(typeName: String, requestedSchema: String, isArray: Boolean = false, searchPath: List<String>): Int

Resolves the OID of a type given its name and an optional schema.

A name with no schema is found on searchPath or not at all, as the server finds it. One the path does not reach is refused even where a single schema has it: that schema can be one this session's role may not see, or another tenant's, and which it is would depend on what else the database holds. The refusal names the schemas that do have it.

Return

the resolved OID.

Parameters

typeName

the name of the type.

requestedSchema

the schema where the type belongs (can be empty).

isArray

whether to resolve the OID for the array type of the given type.

searchPath

the schemas to search, in order, if the schema is not explicitly provided: the server's order for type names, with the schemas it searches unlisted already in it, rather than the setting.

Throws

if the type cannot be found, in the requested schema or on the search path.