Name
registry_remove — Remove a variable from registry
Synopsis
registry_remove
(
|
in
name
varchar
) ; |
Description
The function removes a given variable from registry, so future calls of registry_get returns zero.
Some registry variables are used solely by internal server routines so they should not be changed by any application. Nobody can remove such a "protected" variable even if some of them can be updated by DBA.
Parameters
name
Name of variable to be removed.
Return Types
The function returns the last saved value of a variable or zero if the specified variable does not exists.
Errors
Table 24.74. Errors signalled by registry_set
SQLState | Error Code | Error Text | Description |
---|---|---|---|
22023 | SR014 | Function registry_remove needs a string as argument 1, not an arg of [datatype] | |
42000 | SR485 | Function registry_remove can not remove protected registry variable [name]. |
Examples
Example 24.316. Creation and Removal of a Registry Variable
This sequence of operations demonstrates that
registry_remove
reverts the effect of
registry_set
.
> select registry_get ('my_variable'); 0 > select registry_set ('my_variable', 'my_value'); 1 > select registry_get ('my_variable'); my_value > select registry_remove ('my_variable'); my_value > select registry_get ('my_variable'); 0