The following rules are used to resolved database catalog names:
▪ A fully qualified name (catalog_name.schema_name.database_object_name) does not need any name resolution, but will be validated.
▪ If a catalog context is not set using SET CATALOG, all database object names are resolved always using the default catalog name as the catalog name. The database object name is resolved using schema name resolution rules. For more information about these rules, see CREATE SCHEMA.
▪ If a catalog context is set and the catalog name cannot be resolved using the catalog_name in the context, database_object_name resolution fails.
▪ To access a database system catalog, users do not need to know the system catalog name. Users can specify ""._SYSTEM.table". solidDB translates the empty string " that is used as a catalog name to the default catalog name. solidDB also provides automatic resolution of _SYSTEM schema to the system catalog, even when the catalog name is not provided.
Examples
CREATE CATALOG C; SET CATALOG C; CREATE SCHEMA S; SET SCHEMA S; CREATE TABLE T (i INTEGER); SELECT * FROM T; -- the name T is resolved to C.S.T
-- Assume the userid is SMITH CREATE CATALOG C; SET CATALOG C; CREATE TABLE T (i INTEGER); SELECT * FROM T; -- The name T is resolved to C.SMITH.T
-- Assume there is no Catalog context set. -- Meaning the default catalog name is BASE or the setting -- of the base catalog. CREATE SCHEMA S; SET SCHEMA S; CREATE TABLE T (i INTEGER); SELECT * FROM T; --The name T is resolved to <BASE>.S.T