Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

34 lines (29 sloc) 0.828 kb
create table tu (a int, b int);
create or replace function uu(abort bool) returns bool as '
transaction do |txn|
PL.exec("insert into tu values (1, 2)")
transaction do |txn1|
PL.exec("insert into tu values (3, 4)")
txn1.abort
end
PL.exec("insert into tu values (5, 6)")
txn.abort if abort
end
abort
' language 'plruby';
create or replace function uu() returns bool as '
transaction do |txn1|
PL.exec("insert into tu values (3, 4)")
txn1.abort
end
true
' language 'plruby';
create or replace function tt(abort bool) returns bool as '
transaction do |txn|
PL.exec("insert into tu values (1, 2)")
PL.exec("select uu()")
PL.exec("insert into tu values (5, 6)")
txn.abort if abort
end
abort
' language 'plruby';
Jump to Line
Something went wrong with that request. Please try again.