Re: Trans-transactions cursors
Christof Petig <christof@petig-baender.de>
From: Christof Petig <christof@petig-baender.de>
To: Chamanya <chamanya@yahoo.com>
Cc: pgsql-hackers@postgresql.org
Date: 2001-09-18T12:05:03Z
Lists: 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