有人知道Postgresql中的Sybase BEGIN ATOMIC
等效吗?
应该是这样的:
create or replace function my_func()
returns int
as $$
begin
begin atomic
update stetment1;
update stetment2;
update stetment3;
end;
end;
$$ LANGUAGE PLPGSQL;
三个更新语句必须要么全部成功要么全部失败。