The database objects in the SPL program can be referenced by using either a qualified name or an unqualified name.

The form of a qualified name is schema.name, in which schema specifies the name of the schema for a database object and name specifies the name of the database object. An unqualified name does not contain the "schema." portion. If a qualified name is used, the database object is precisely specified. In the specified schema, the object either exists or does not exist.

If you use an unqualified name to locate an object, you must use the search path of the current user. If a user becomes the current user of the session, the default search path is used to associate with the user. A search path consists of a list of schemas. The search sequence is from left to right when a data object with an unqualified name is referenced. If no corresponding object is found from the list of schemas in the search path, the object does not exist. You can use the SHOW search_path command in PolarDB to display the default search path.
SHOW search_path;

     Search_path
----------------------
 $ User, public, sys, dbo
(1 row)

In this example, $user is a placeholder that refers to the current user. If the current user in the preceding session is polardb, a database object with an unqualified name is searched in order in the following schemas: polardb, public, sys, and dbo.

When an unqualified database object is parsed in the search path, the system checks whether the current user is authorized to perform the corresponding operations on the specified object.

Note The concept of the search path in PolarDB is incompatible with that in Oracle databases. For an unqualified reference, Oracle database services only search for database objects with the specified name in the schema of the current user. In Oracle databases, a user and the schema are the same entity. However, in PolarDB, the user and the schema are two different objects.