Use the PUT_PARAM() function to place a parameter on the bulletin board. If the parameter already exists, the new value overwrites the previous one.
With solidDB Intelligent Transaction, SQL statements or procedures of a transaction can communicate with each other by passing parameters to each other using a parameter bulletin board. The bulletin board is a storage of parameters that is visible to all statements of a transaction.
The PUT_PARAM() function can be used in both the master and replicas for setting parameters to the parameter bulletin board of the current transaction.
Parameters are specific to a catalog. Different replica and master catalogs have their own set of bulletin board parameters that are not visible to each other.
These parameters are not propagated to the master. You can use the SAVE PROPERTY statement to propagate properties from the replica to the master. For details, read SAVE PROPERTY.
Because PUT_PARAM() is an SQL function, it can be used only within a procedure or in an SQL statement.
Both the parameter name and value are of type VARCHAR.
Differences between PUT_PARAM() function and SAVE PROPERTY statement
You typically use PUT_PARAM() inside the (running) transaction to pass parameters between procedures. These parameter values disappear from the bulletin board when the transaction terminates (commits or rolls back).
You typically use the SAVE PROPERTY statement in a replica database to set properties for the entire transaction. These properties can be used in the WHERE clause of the MESSAGE APPEND PROPAGATE TRANSACTIONS statement. When the transaction is executed in the master database, the properties of the transaction are put on the parameter bulletin board of the transaction at the start of the transaction. Hence, they can be accessed by all procedures in the transaction by using the GET_PARAM() function.
Return values
Error code
Description
13086
Invalid data type in a parameter.
When executed successfully, PUT_PARAM() returns the new value of the assigned parameter.