www.openlinksw.com
docs.openlinksw.com

Book Home

Contents
Preface

Virtuoso Functions Guide

Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Phrases
RDF data
Remote SQL Data Source
Replication
SOAP
SQL
__any_grants
close
collation_define
complete_table_name
delay
end_result
exec
exec_metadata
exec_next
exec_result
exec_result_names
exec_score
identity_value
name_part
registry_get
registry_get_all
registry_name_is_pro...
registry_remove
registry_set
result
result_names
row_count
sequence_get_all
sequence_next
sequence_remove
sequence_set
set_identity_column
set_row_count
set_user_id
signal
sinv_create_inverse
sinv_create_key_mapp...
sinv_drop_inverse
sys_stat_analyze
sys_stat_histogram
table_drop_policy
table_set_policy
username
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web & Internet
XML
XPATH & XQUERY

Functions Index

registry_set

Associates a value to the name in the Database registry
registry_set (in name varchar, in value varchar, [in force integer]);
Description

This associates a value to the name in the Database registry. The name should be a string and the value must be also string.

Registry settings are kept in Database, therefore they are persistent.

Some registry variables are used solely by internal server routines so they should not be set 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. If the function is called by DBA then a third argument can be specified to indicate how the function should try to update such a variable, but you will probably never use this feature.

Parameters
name – VARCHAR name to associate the value with.
value – value to be stored. Must be of VARCHAR type. Also if needs to be stored some other datatype it needs to be serialized (see serialize and deserialize functions).
force – Flag to indicate how the function should try to update protected variables. The value 0 is to signal an error on such an attempt, 1 is to try to update and signal an error if failed, 2 is to try to update and silently return 0 if failed.
Return Values

The function returns 1 if success, 0 if a (protected) variable value cannot be changed.

Errors
SQLState Error Code Error Text Description
22023 SR014 Function registry_set needs a string as argument 2, not an arg of [datatype]
42000 SR483 Function registry_set needs nonzero third argument to modify registry variable [name].
42000 SR484 Function registry_set can not modify protected registry variable [name].

Examples
Setting and Retrieving Registry Setting

From SQL

SQL> select registry_get('var_demo');
callret
VARCHAR
__________________________________________________________________

NULL

SQL> registry_set('var_demo', 'some arb data');

SQL> select registry_get('var_demo');
callret
VARCHAR
__________________________________________________________________

some arb data
See Also

registry_get

registry_name_is_protected

registry_get_all

registry_remove

sequence_get_all

sequence_next

sequence_set

sequence_remove