Re: autocommit and transactions

Поиск
Список
Период
Сортировка
От gnari
Тема Re: autocommit and transactions
Дата
Msg-id 001e01c4d7d7$8d213240$0100000a@wp2000
обсуждение исходный текст
Ответ на autocommit and transactions  ("Sally Sally" <dedeb17@hotmail.com>)
Список pgsql-general
From: "Sally Sally" <dedeb17@hotmail.com>


> Using perl DBI I recently read that if autocommit is turned on, it does a
> commit after every transaction. I wanted to confirm if this also applies
to
> select statements.

in fact, it wraps every statement that is not aleady in a transaction,
into one.

> When I'm loading data, I need to do a select before inserting a new row
and
> I don't want to commit after the select because it's unnecessary. So I am
> thinking of turning off the autocommit. Any thoughts?

$dbh->begin_work;
<your statements here>
...
$dbh->commit;


gnari




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

Предыдущее
От: Scott Frankel
Дата:
Сообщение: Re: data integrity and inserts
Следующее
От: Joachim Zobel
Дата:
Сообщение: createlang plperl fails with 8.0 beta5