Re: [HACKERS] Transaction control in procedures

2017-11-08 Thread Simon Riggs
On 31 October 2017 at 15:38, Peter Eisentraut wrote: > Here is a patch that implements transaction control in PL/Python > procedures. (This patch goes on top of "SQL procedures" patch v1.) The patch is incredibly short for such a feature, which is probably a

[HACKERS] Transaction control in procedures

2017-10-31 Thread Peter Eisentraut
Here is a patch that implements transaction control in PL/Python procedures. (This patch goes on top of "SQL procedures" patch v1.) So you can do this: CREATE PROCEDURE transaction_test1() LANGUAGE plpythonu AS $$ for i in range(0, 10): plpy.execute("INSERT INTO test1 (a) VALUES (%d)" % i)