Hello all, After some investigation of DBI's code, and DBD-Pg I came to the conclusion that errors from the SQL backend are not reported back to the DBD, and DBD only reports 'commit failed\n', not the actual error from the SQL backend. This behaviour seems to be the same for DBD-Oracle and DBD-Sybase.
Secondly if the DBI's connection was in a Non-AutoCommit mode, the database-state was left without issuing a BEGIN after the failed COMMIT. Again, this seemed to be missing in the above DBD implementations. [ this is tested against DBI-1.32 and DBD-Pg-1.20 ] Now I'm wondering if this behaviour is normal. It seems wrong to me at least, but it could be ill logic on my side :-/. I have attached a postgresql create table script, some plain SQL queries, and a perlscript doing that same queries via DBD::Pg to show a reproducable commit-error in postgresql. (I have no Oracle at hand, nor Sybase, though I know that Sybase does the same tricks with triggers invoking at commit). Interesting output in the script: DBD::Pg::db commit failed: commit failed at dbh-test.pl line 52. and: NOTICE: COMMIT: no transaction in progress Further along; I could send in a patch for DBD-Pg, but I'm no freak with memory leaks etc... Thanks for any enlightenment, -- Kai 96 pings make up a single Bong (Peter Salus)
