为什么输出如此?

时间:2015-09-17 11:46:24

标签: postgresql

我有以下代码:(假设初始txid = a)

select count(*) from tabl;
--------------------------
count=2;

select current_txid();
--------------------------
a+1;

begin;
insert into tabl values(v1,v2);
insert into tabl values(v3,v4);
commit;

select count(*) from tabl;
--------------------------
count=4;

select current_txid();
--------------------------
a+3

为什么/当前的txid = 3应该是多少,因为有多个sql语句即事务?

0 个答案:

没有答案
相关问题