1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
-- ----------------------------------------------------------------
-- Establishes global setting behavior with stored procedures.
-- ----------------------------------------------------------------
-- Outside stored procedure.
SELECT hll_set_max_sparse(256);
hll_set_max_sparse
--------------------
-1
(1 row)
SELECT hll_set_defaults(10,4,128,0);
hll_set_defaults
------------------
(11,5,-1,1)
(1 row)
-- When defining a stored procedure the global statements don't take
-- effect.
CREATE OR REPLACE FUNCTION testfunc_azfwygmg() RETURNS void AS $$
BEGIN
PERFORM hll_set_max_sparse(-1);
PERFORM hll_set_defaults(11,5,-1,1);
END;
$$ LANGUAGE plpgsql;
SELECT hll_set_max_sparse(256);
hll_set_max_sparse
--------------------
256
(1 row)
SELECT hll_set_defaults(10,4,128,0);
hll_set_defaults
------------------
(10,4,128,0)
(1 row)
-- When invoking a stored procedure they work.
SELECT testfunc_azfwygmg();
testfunc_azfwygmg
-------------------
(1 row)
SELECT hll_set_max_sparse(256);
hll_set_max_sparse
--------------------
-1
(1 row)
SELECT hll_set_defaults(10,4,128,0);
hll_set_defaults
------------------
(11,5,-1,1)
(1 row)
|