forked from citusdata/postgresql-hll
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtransaction.sql
42 lines (22 loc) · 804 Bytes
/
transaction.sql
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
-- ----------------------------------------------------------------
-- Establish global statement's properties WRT transactions.
-- ----------------------------------------------------------------
-- Outside transaction.
SELECT hll_set_max_sparse(-1);
SELECT hll_set_max_sparse(256);
SELECT hll_set_defaults(11,5,-1,1);
SELECT hll_set_defaults(10,4,128,0);
-- Inside transaction - should have an affect later.
BEGIN;
SELECT hll_set_max_sparse(-1);
SELECT hll_set_defaults(11,5,-1,1);
COMMIT;
SELECT hll_set_max_sparse(256);
SELECT hll_set_defaults(10,4,128,0);
-- Inside Rolled back transaction, should still have an affect later.
BEGIN;
SELECT hll_set_max_sparse(-1);
SELECT hll_set_defaults(11,5,-1,1);
ROLLBACK;
SELECT hll_set_max_sparse(256);
SELECT hll_set_defaults(10,4,128,0);