Re: Trans-transactions cursors

Поиск
Список
Период
Сортировка
От Christof Petig
Тема Re: Trans-transactions cursors
Дата
Msg-id 3BA7386F.433DF899@petig-baender.de
обсуждение исходный текст
Ответ на Trans-transactions cursors  ("Ludovic Pénet" <lpenet@cubicsoft.com>)
Список pgsql-hackers
Chamanya wrote:

> I am currently building a small web based app, with postgres as back end. I
> found that in ecpg you can declare and use cursor without declaring a
> transaction. In several places I have used cursors for selects only. That's
> the only way I found to make ecpg fetch multiple rows.
>
> And in ecpg I have to give an explicit open cursor statement to make fetching
> possible.

That's simply because ecpg starts a new transaction on any SQL statement if no
transaction is active.
I consider this (autocommit on) one of the worst traps you can lay for yourself.

Christof




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

Предыдущее
От: Haller Christoph
Дата:
Сообщение: Re: triggers procedures listing URGENT
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: CVS access problem