On Sat, Apr 26, 2008 at 4:19 PM, Ivan Sergio Borgonovo <mail@xxxxxxxxxxxxxxx> wrote: > > With the added @ everything seemed to be OK. No, the @ is just making php quietly swallow the postgresql errors that are being returned. It changes nothing in operation. > I had to refresh a second time to get rid of the error. > I'd like to be sure I've understood how it works since I wouldn't > like the error went away just by chance and under heavy load I may > have troubles. I'm pretty sure you're not undestanding how it works. With postgresql, ANY error in a transaction results in the whole transaction being rolled back. Any commands thrown at the database after that result in this error message: > Why did I get the > ERROR: current transaction is aborted, commands ignored until end of > transaction block > from 2 different pages? because each page got an error in a statement inside its transaction. It then issued the above error over and over as you attempted to execute the next statement. In postgresql, without using savepoints, any error in the transaction will cause the whole transaction to fail, whether you type commit or rollback at the end. All the changes are lost either way. So, there's no "cleanup" to do for the transaction, it's already cleaned up.