NonStop SQL/MP Reference Manual

Table Of Contents
NonStop SQL/MP Reference Manual142115
V-7
Catalog Versions
Catalog Versions
Each NonStop SQL/MP catalog has a version that indicates the newest-version object
you can register in the catalog.
When you create a catalog using NonStop SQL/MP software of version 300 or later,
NonStop SQL/MP assigns the new catalog the version of the NonStop SQL software
running on the node on which the catalog resides. You can change the version with
UPGRADE CATALOG or DOWNGRADE CATALOG, but no catalog can have a
newer version than the software on the catalog's node, or an older version than that of
the newest-version object registered in the catalog.
A system catalog follows the same rules as any other catalog except that you use
UPGRADE SYSTEM CATALOG and DOWNGRADE SYSTEM CATALOG to change
the version. A system catalog can also register user catalogs of newer versions (because
these are not considered NonStop SQL/MP objects) but cannot register objects of newer
versions.
The command GET VERSION OF CATALOG returns the version of a catalog.
Object Versions
Each NonStop SQL/MP object (table, view, index, constraint, or collation) has a version
that indicates the oldest version of NonStop SQL/MP that can support that object.
The version of an object depends on the features used in the object and in other objects
on which that object depends. For example, if you create a table that uses only features
that were available in version 1 of NonStop SQL/MP, the table is associated with
version 1, even if you create it with version 315 software. If you add a column to the
table that has the NCHAR data type, however, the version of the table becomes version
300 (because the NCHAR data type is first supported in version 300).
Because the version of an object affects the version of any object that depends upon that
object, changing the version of an object can automatically change the version of other
objects that depend on that object. For example, adding an index that has a newer
version than the associated table changes the version of the table. If the table has a
dependent view, the operation also changes the version of the view.
The GET VERSION command returns the version of a table, view, index, or collation.
Program Versions
Each compiled NonStop SQL/MP program has three different versions associated with
it:
The host object SQL version (HOSV) is the version of the host language compiler
that compiled the program. It indicates the oldest version of the SQL compiler that
can compile the program.
The program catalog version (PCV) is the version of the newest-version SQL
feature used in the program. It indicates the oldest version of a catalog that can
register the program. A program can access objects with versions older or newer