Re: Perl and AutoCommit

Поиск
Список
Период
Сортировка
От Yanni Chiu
Тема Re: Perl and AutoCommit
Дата
Msg-id 42464DE3.C6493026@rogers.com
обсуждение исходный текст
Ответ на Perl and AutoCommit  (Madison Kelly <linux@alteeve.com>)
Список pgsql-general
Madison Kelly wrote:
>
>    What I am trying to do is turn off autocommit for one particular task
> in my program. I realize I can turn off AutoCommit when I connect to the
> database but in this case that is not what I want to do. This is a
> one-off task.
>
>    What I thought would work was:
>
> $DB->begin_work() || die...
> # a lot of transactions
> $DB->commit() || die...
>
>    But that doesn't seem to be it, either...

The way I read the postgres docs, there is no autocommit.
Every sql command is wrapped in a transaction, unless
you issue a "BEGIN" (or "START TRANSACTION").

What makes you think that the code above did not work?
What Perl library are you using?
What does $DB->begin_work() actually do?
--I'm thinking there could be a $DB->begin_transaction()
You could turn on some trace output in the postgres
server (i.e. postmaster), and observe the sequence
of SQL that is being sent. HTH.

--yanni

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

Предыдущее
От: "Sim Zacks"
Дата:
Сообщение: Re: Good Books
Следующее
От: Madison Kelly
Дата:
Сообщение: Re: Perl and AutoCommit