mirror of https://github.com/citusdata/citus.git
Remove the explicit-transaction requirement for the UDF citus_get_transaction_clock() as implicit transactions too use this UDF.
parent
77fbcfaf14
commit
7358b826ef
|
@ -415,8 +415,6 @@ PrepareAndSetTransactionClock(void)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
RequireTransactionBlock(true, "citus_get_transaction_clock");
|
|
||||||
|
|
||||||
dlist_iter iter;
|
dlist_iter iter;
|
||||||
List *transactionNodeList = NIL;
|
List *transactionNodeList = NIL;
|
||||||
List *nodeList = NIL;
|
List *nodeList = NIL;
|
||||||
|
|
|
@ -259,9 +259,6 @@ SELECT ABS(:epoch - cluster_clock_logical(:'latest_clock')) < 25;
|
||||||
t
|
t
|
||||||
(1 row)
|
(1 row)
|
||||||
|
|
||||||
-- This should fail as there is no explicit transaction
|
|
||||||
SELECT citus_get_transaction_clock();
|
|
||||||
ERROR: citus_get_transaction_clock can only be used in transaction blocks
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SELECT citus_get_transaction_clock();
|
SELECT citus_get_transaction_clock();
|
||||||
citus_get_transaction_clock
|
citus_get_transaction_clock
|
||||||
|
|
|
@ -101,9 +101,6 @@ SELECT (extract(epoch from now()) * 1000)::bigint AS epoch,
|
||||||
-- Returns true
|
-- Returns true
|
||||||
SELECT ABS(:epoch - cluster_clock_logical(:'latest_clock')) < 25;
|
SELECT ABS(:epoch - cluster_clock_logical(:'latest_clock')) < 25;
|
||||||
|
|
||||||
-- This should fail as there is no explicit transaction
|
|
||||||
SELECT citus_get_transaction_clock();
|
|
||||||
|
|
||||||
BEGIN;
|
BEGIN;
|
||||||
SELECT citus_get_transaction_clock();
|
SELECT citus_get_transaction_clock();
|
||||||
END;
|
END;
|
||||||
|
|
Loading…
Reference in New Issue