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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster