Re: Using transactions with plpythonu

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "imageguy" <imageguy1206(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Using transactions with plpythonu
Date: 2007-01-21 18:21:34
Message-ID: 27904.1169403694@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"imageguy" <imageguy1206(at)gmail(dot)com> 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/COMMIT from within a
function because that would represent destroying the transaction that
supports your execution of the function.

AFAICT you are worried about whether several different updates issued by
your function will all be committed atomically. They will be; you don't
need to, and indeed can't, do anything to adjust that. If there was
some other issue you had, you need to be more specific...

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2007-01-21 18:36:05 Re: More grist for the PostgreSQL vs MySQL mill
Previous Message Tom Lane 2007-01-21 18:12:06 Re: Using transactions with plpythonu