Search Postgresql Archives

Re: plperl and/or insert trigger problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 06, 2007 at 04:44:03PM +0100, Richard Huxton wrote:
> I've had a quick look at my copy of DBI.pm (Debian Etch - lives in 
> /usr/lib/perl5/DBI.pm)
> 
> Around line 1930, we have the error-handling for execute_for_fetch()
> 
> else {
>   $err_count++;
>   my $err = $sth->err;
>   push @$tuple_status, [ $err, $errstr_cache{$err} ||= $sth->errstr, 
> $sth->state ];

The reference to erstr_cache seems to infer that the code assumes there
can be only one error string for any particular. Looking at the code I
can't work out why that variable even exists.

I'd say replace that line with:

push @$tuple_status, [ $err, $sth->errstr, $sth->state];

And be done with it...

Have a nice day,
-- 
Martijn van Oosterhout   <kleptog@xxxxxxxxx>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Attachment: signature.asc
Description: Digital signature


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux