Name

registry_name_is_protected — The function checks if a given registry variable is read-only or protected from occasional changes.

Synopsis

registry_name_is_protected ( in name varchar );

Description

Some registry variables are used solely by internal server routines so they should not be changed by any application. Some of these "protected" variables can be updated by DBA only (in built-in Virtuoso/PL routines) whereas some can not be updated by any Virtuoso/PL routine at all.

The function gets a variable name as a parameter and returns zero if such a variable variable can be created/modified/removed by any application, one if a variable can be modified by DBA but can not be removed and two if the variable can not be altered even by DBA.

The returned value does not indicate that the variable exists or not exists. The name of not yet existing variable can be protected anyway to prevent future misuse of an variable by an application.

The name of any protected variable starts with two underscores. It can be a good idea to not start names of application-specific registry variable with two underscores to ensure compatibility with future versions of Virtuoso Server.

Parameters

name

The name of registry variable to check.

Return Types

The function returns an integer

Examples

Example24.314.Two checks of variable names

One name can be used by any application, other is for internal use in the FTP server:

> select registry_name_is_protected ('my_example');
0

> select registry_name_is_protected ('__next_free_port');
1