Re: Using transactions with plpythonu

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Using transactions with plpythonu
Дата
Msg-id 27904.1169403694@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Using transactions with plpythonu  ("imageguy" <imageguy1206@gmail.com>)
Ответы Re: Using transactions with plpythonu  ("imageguy" <imageguy1206@gmail.com>)
Список pgsql-general
"imageguy" <imageguy1206@gmail.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

В списке pgsql-general по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Using transactions with plpythonu
Следующее
От: Tom Lane
Дата:
Сообщение: Re: More grist for the PostgreSQL vs MySQL mill