956
社区成员
发帖
与我相关
我的任务
分享
START TRANSACTION;
insert into test values(99);
COMMIT;
insert into test values(4);
insert into test values(5);
START TRANSACTION;
insert into test values(99);
COMMIT;
insert into test1 values(6);
insert into test values('ss');
insert into test1 values(4);
insert into test1 values(4);
insert into test values(4);
START TRANSACTION;
insert into test values(96);
insert into test1 values(96);
COMMIT;
drop table if exists A;
drop table if exists B;
create table A
(
a text
);
create table B
(
b text
);
CREATE OR REPLACE FUNCTION test(aa text,bb text)
RETURNS void AS
$body$
DECLARE
BEGIN
START TRANSACTION;
insert into A(a) values($1);
insert into B(b) values($2);
COMMIT;
END
$body$
LANGUAGE plpgsql;
select test('ss','fff');