云数据库 GAUSSDB-DBE_SESSION:示例

时间:2024-11-02 18:46:49

示例

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
DECLARE
    a text;
BEGIN
    DBE_SESSION.set_context('test', 'gaussdb', 'one');   --设置名为test的context下属性为gaussdb的值为one
    a := DBE_SESSION.search_context('test', 'gaussdb');
    DBE_OUTPUT.PRINT_LINE(a);
    DBE_SESSION.clear_context('test', 'test','gaussdb');
END;
/
-- 预期结果为:
one
ANONYMOUS BLOCK EXECUTE
support.huaweicloud.com/distributed-devg-v3-gaussdb/gaussdb-12-0758.html