Remove the explicit-transaction requirement for the UDF citus_get_transaction_clock() as implicit transactions too use this UDF.

marcocitus/distributed-snapshot-isolation-v0
Teja Mupparti 2022-11-08 12:25:51 -08:00 committed by Teja Mupparti
parent 77fbcfaf14
commit 7358b826ef
3 changed files with 0 additions and 8 deletions

View File

@ -415,8 +415,6 @@ PrepareAndSetTransactionClock(void)
return NULL;
}
RequireTransactionBlock(true, "citus_get_transaction_clock");
dlist_iter iter;
List *transactionNodeList = NIL;
List *nodeList = NIL;

View File

@ -259,9 +259,6 @@ SELECT ABS(:epoch - cluster_clock_logical(:'latest_clock')) < 25;
t
(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;
SELECT citus_get_transaction_clock();
citus_get_transaction_clock

View File

@ -101,9 +101,6 @@ SELECT (extract(epoch from now()) * 1000)::bigint AS epoch,
-- Returns true
SELECT ABS(:epoch - cluster_clock_logical(:'latest_clock')) < 25;
-- This should fail as there is no explicit transaction
SELECT citus_get_transaction_clock();
BEGIN;
SELECT citus_get_transaction_clock();
END;