Re: [GENERAL] Using transactions with plpythonu

2007-01-22 Thread imageguy
Tom Lane wrote: > "imageguy" <[EMAIL PROTECTED]> writes: > > In my testing so far, it seems that each call to plpy.execute('INSERT > > INTO ') is committed immediately. > > On what do you base that (erroneous) conclusion? > > The fact that a transaction can see its own updates does not mean th

Re: [GENERAL] Using transactions with plpythonu

2007-01-22 Thread imageguy
Tom Lane wrote: > "imageguy" <[EMAIL PROTECTED]> writes: > > So... unless I am missing something, I would suggest you CANNOT us > > plpython (or perhaps any other pl language ??) to process transactions > > I think the point you are missing is that every function already runs > within a transactio

Re: [GENERAL] Using transactions with plpythonu

2007-01-21 Thread Tom Lane
"imageguy" <[EMAIL PROTECTED]> writes: > So... unless I am missing something, I would suggest you CANNOT us > plpython (or perhaps any other pl language ??) to process transactions I think the point you are missing is that every function already runs within a transaction. You can't issue BEGIN/CO

Re: [GENERAL] Using transactions with plpythonu

2007-01-21 Thread Tom Lane
"imageguy" <[EMAIL PROTECTED]> writes: > In my testing so far, it seems that each call to plpy.execute('INSERT > INTO ') is committed immediately. On what do you base that (erroneous) conclusion? The fact that a transaction can see its own updates does not mean they are committed.

Re: [GENERAL] Using transactions with plpythonu

2007-01-21 Thread Clodoaldo
21 Jan 2007 06:53:15 -0800, imageguy <[EMAIL PROTECTED]>: > What happens if you do: > > plpy.execute("BEGIN"); > > before and after > > plpy.execute("COMMIT"); > > Have a nice day, > -- Thanks for your reply Martin. After making my post I decide not to be so lazy and set up a test environment. Af

Re: [GENERAL] Using transactions with plpythonu

2007-01-21 Thread imageguy
> What happens if you do: > > plpy.execute("BEGIN"); > > before and after > > plpy.execute("COMMIT"); > > Have a nice day, > -- Thanks for your reply Martin. After making my post I decide not to be so lazy and set up a test environment. After try exactly what you suggested, I got the following erro

Re: [GENERAL] Using transactions with plpythonu

2007-01-21 Thread imageguy
Martijn van Oosterhout wrote: > On Sun, Jan 21, 2007 at 04:56:23AM -0800, imageguy wrote: > > Does anyone have an example of using transactions with plpythonu ? > > > > In my testing so far, it seems that each call to plpy.execute('INSERT > > INTO ') is committed immediately. > > What happens

Re: [GENERAL] Using transactions with plpythonu

2007-01-21 Thread Martijn van Oosterhout
On Sun, Jan 21, 2007 at 04:56:23AM -0800, imageguy wrote: > Does anyone have an example of using transactions with plpythonu ? > > In my testing so far, it seems that each call to plpy.execute('INSERT > INTO ') is committed immediately. What happens if you do: plpy.execute("BEGIN"); before