Subject: | $sth->state and $dbh->state behaviour changed |
Hi,
first the core stuff:
Perl 5.8.0, DBD::Pg 1.42
We (OpenCA) received several messages from people which use the newest version of Perl database drivers (DBD::Pg 1.42) that the function state returns "00000" in case of a success. The problem is that the other databases which we support (MySQL, DB2, Oracle, SQLite) use the recommendation from the Perl DBI specification (from DBI 1.48 in CPAN):
"Note that the specific success code 00000 is translated to any empty string (false)."
The PostgreSQL database driver returns "00000" which is true in Perl. This breaks all code which uses state to handle SQLERROR. Actually we fall back to err and errstr which are also a good source for errormessages but it would be nice if DBD::Pg is fully compliant to the DBI spec.
Greetings Michael