Note that in version 7 and earlier, the variable
$null was used
as the default for the
NULL option (as
$null predated the
NULL option itself). However, this
left an important part of the behavior of a
unspecified by the statement itself, and potentially dependent upon a
variable assignment (<$null = ...>) forgotten elsewhere - such
ambiguity could cause problems.
Thus, in version 8 and later, the
$null variable has no effect
<SQL> statements, and is repurposed as a constant with no
values, for situations where that is useful (e.g. passing a no-values
- as opposed to single-value empty-string - argument to a parameter).
Modifications to it are not permitted, and result in the runtime error
"$null is a constant and may not be modified".
For legacy code, this behavior change can be reverted by setting
to 7 or less to make the
NULL option default to
(and the latter be modifiable).
Note that as this is a dynamic behavior change and not a syntax
change, it is controlled at runtime by
<vxcp> or the like), not at compile time by
pragma or the like).
The --translate-from-version option
(here) will warn when it detects