SQL/MP Version Management Guide

Program Versions
Compaq NonStop™ SQL/MP Version Management Guide429833-001
5-5
SQL Program Versions
SQL Program Versions
To prevent programs developed for older versions of SQL/MP from behaving
unpredictably, either when they are running or when they are being used with new
features and new catalog structures, SQL/MP assigns two types of versions to every
SQL program: the program format version (PFV) and the program catalog version
(PCV).
The program format version (PFV) identifies the minimum version of the SQL executor
needed to execute the program. The program catalog version (PCV) identifies the oldest
version of the catalog in which the program can be registered.
Program Format Version (PFV)
A program format version number (PFV) is a version number assigned to an SQL
program. This number identifies the minimum version of the SQL executor needed to
execute the program. PFV numbers were introduced with version 300. Consequently,
the PFV of programs compiled with a version 1 or 2 SQL compiler is zero. The SQL
executor cannot execute a program on a given node successfully unless the format
version of the program is older than or the same as the version of the SQL executor.
Internally, the PFV of an SQL program identifies the format of the information that the
SQL compiler stores in a program’s object file.
The PFV of a program is always the same as the version of the SQL compiler used to
compile the program. In turn, the version of the SQL compiler always corresponds to a
particular version of the SQL/MP software.
For example, a program compiled by a version 315 SQL compiler has a program format
version of 315. This fact means that the program can be executed by a version 315 or
newer SQL executor. However, the program cannot be executed by a version 1 SQL
executor. If you attempt to execute an SQL program with an SQL executor with an older
version than the format version of the program, SQL issues a version error.
The program format version of an SQL program is associated with features in the
corresponding version of the SQL/MP software. For example, because collations were
introduced with version 300 of the software, an SQL compiler with a PFV of at least
300 is needed to compile a program that contains collations.
This figure illustrates the relationship of the program format version to the SQL
compiler and SQL executor versions:
The rules determining the relationship of program format versions to database versions
are:
SQL Compiler
Version
=
Program Format
Version
<=
SQL Executor
Version
VST010.vsd
SQL
Executor
SQL
Compiler
SQL
Program