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



---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to