SQL/MX 2.x Reference Manual (H06.04+)

Metadata Tables
HP NonStop SQL/MX Reference Manual540440-003
10-50
Object Naming
2. For SQL statements issued through MXCI and embedded SQL, the compiler uses
the SYSTEM_DEFAULTS table entry (if it exists).
3. For SQL statements issued through MXCI and embedded SQL, if these values are
not set, the system-defined default setting for the NAMETYPE attribute is ANSI.
Attribute Value ANSI for Logical Names
If the NAMETYPE attribute is ANSI or is not specified, object names are determined
according to rules applied in this order:
1. If you specify a fully qualified three-part logical name explicitly in your SQL
statement, the SQL/MX compiler compiles the statement by using the three parts
of this name.
2. The SET CATALOG statement, SET SCHEMA statement, and CONTROL QUERY
DEFAULT statement have the same precedence:
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