Re: Using transactions with plpythonu - Mailing list pgsql-general

From Martijn van Oosterhout
Subject Re: Using transactions with plpythonu
Date
Msg-id 20070121134524.GC2123@svana.org
Whole thread Raw
In response to Using transactions with plpythonu  ("imageguy" <imageguy1206@gmail.com>)
Responses Re: Using transactions with plpythonu  ("imageguy" <imageguy1206@gmail.com>)
Re: Using transactions with plpythonu  ("imageguy" <imageguy1206@gmail.com>)
List pgsql-general
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 and after

plpy.execute("COMMIT");

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: [HACKERS] Autovacuum Improvements
Next
From: "Chad Wagner"
Date:
Subject: Re: More grist for the PostgreSQL vs MySQL mill