Are you sure that you're checking error message of the right call?
The DBI docs say this :-
$str = $h->errstr; Returns the native database engine error message from the last DBI + method called. ... and $DBI::err Equivalent to "$h->err". $DBI::errstr Equivalent to "$h->errstr". $DBI::state Equivalent to "$h->state".
So didn't you just check if the last_insert_id call succeeded?
You need to check the err and maybe the state after the execute. So at least something like
$rv = $sth->execute or die $sth->errstr;
BTW it's probably worth asking this question on the posrgresql mailing list or IRC, as they'll know the best way to do this and it's more of a DB problem than a perl one.
In reply to Re: Capturing warnings from DBD:PG
by RichardK
in thread Capturing warnings from DBD:PG
by HeadScratcher
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |