SQL/MX 2.x Reference Manual (H06.10+, J06.03+)

Metadata Tables
HP NonStop SQL/MX Reference Manual544517-008
10-53
Object Naming
If you do not specify a fully qualified logical name and you issue a SET
CATALOG or SET SCHEMA statement, the compiler uses the setting
determined by these statements as the current catalog (the first part) or
schema (the second part).
Use the SET CATALOG and SET SCHEMA statements in MXCI. For
embedded SQL, the SET CATALOG and SET SCHEMA statements affect only
dynamic embedded SQL. The DECLARE CATALOG and DECLARE SCHEMA
statements affect only static embedded SQL.
For SQL statements issued through MXCI and embedded SQL, the compiler
uses the CATALOG or SCHEMA values set by CONTROL QUERY DEFAULT
statements (if issued).
3. For SQL statements issued through MXCI and embedded SQL, the compiler uses
the CATALOG or SCHEMA values in the SYSTEM_DEFAULTS table (if they exist).
4. For SQL statements issued through MXCI and embedded SQL, if these values are
not set, the system-defined default setting for catalog.schema is group.user,
which is the current user ID.
Attribute Value NSK for Guardian Names and Guardian Name Resolution
If the NAMETYPE attribute is set to NSK, object names are determined according to
rules applied in this order:
1. If you specify a fully qualified physical name explicitly in your SQL statement, the
SQL/MX compiler compiles the statement by using the four parts of this name: the
physical system, volume, subvolume, and file names.
2. The SET MPLOC statement and CONTROL QUERY DEFAULT statement have
the same precedence:
If you do not specify a fully qualified object name and you issue a SET MPLOC
statement, the compiler uses the setting determined by these statements as
the current physical location. SET MPLOC changes the values for default
attributes MP_SYSTEM, MP_VOLUME and MP_SUBVOLUME.
Use the SET MPLOC statement in MXCI. For embedded SQL, the SET
MPLOC statement affects only dynamic embedded SQL. The DECLARE
MPLOC statement affects only static embedded SQL.
For SQL statements issued through MXCI and embedded SQL, the compiler
uses the MP_SYSTEM, MP_VOLUME or MP_SUBVOLUME values set by
CONTROL QUERY DEFAULT statements (if issued).
3. For SQL statements issued through MXCI and embedded SQL, the compiler uses
the MP_SYSTEM, MP_VOLUME or MP_SUBVOLUME values in the
SYSTEM_DEFAULTS table (if they exist).
4. For SQL statements issued through MXCI and embedded SQL, if these values are
not set, the system-defined default setting for $volume.subvol is specified by
the =_DEFAULTS define.