Unqualified type, variable, function, procedure, and specific names
The qualification of data type (built-in types, distinct types, and array types), variable, function, procedure, and specific names depends on the SQL statement in which the unqualified name appears.
- If an unqualified name is the main object of an ALTER, CREATE, COMMENT, LABEL, DROP, GRANT, or REVOKE statement, the name is implicitly qualified using the same rules as for qualifying unqualified table names (See Unqualified alias, constraint, external program, index, nodegroup, package, sequence, table, trigger, view, and XSR object names).
- Otherwise, the implicit schema name is determined as follows:
- For distinct type and array type names, database manager searches the SQL path and selects the first schema in the path such that the data type exists in the schema.
- For variable names, database manager searches the SQL path and selects the first schema in the path such that the schema contains an authorized variable with the same name
- For procedure names, database manager searches the SQL path and selects the first schema in the path such that the schema contains an authorized procedure with the same name and number of parameters.
- For function names, database manager uses the SQL path in conjunction with function resolution, as described under Function resolution.
- For specific names specified for sourced functions, see CREATE FUNCTION (Sourced).