perl-embperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Terrence Brannon <metap...@urth.org>
Subject Re: DBIx::Recordset - sql_type and pg_type
Date Sat, 13 Mar 2004 15:18:53 GMT
Kaare Rasmussen wrote:

>This happens with DBIx::Recordset 0.25.
>  
>
I'm sorry I didn't respond to your earlier version of this post.

I have a version 0.25a in my svn repository. Perhaps I did not upload it.

>Excerpt from run with debug:
>
>DB:  do 'UPDATE transactions SET archived=?,status=? WHERE archived = 0 AND 
>deleted = 0 AND order_number IN (2288)' bind_values=<1 order> bind_types=<1 
>12>
>Cannot specify both sql_type and pg_type at /usr/lib/perl5/site_perl/5.8.1/
>DBIx/Database.pm line 148.
>  
>

What source code did this? Is it possible for a query using 
DBSchema::Sample:

   http://dbschema-sample.berlios.de/

to create the same problem?

>Commenting out lines #147-148 and reenabling line # 146 seems to finish this 
>problem. But it seems to be a troublesome spot, judging by the number of 
>commented lines :-)
>  
>

I'm not sure whch lines you are referring to. Could you show me what the 
source code in those lines looks like? Here is what 0.25a has there:

== lines 143 - 152 ===

for (my $i = 0 ; $i < @$bval; $i++)
                {
                $bval -> [$i] += 0 if (defined ($bval -> [$i]) && 
defined ($btype -> [$i]) && $Numeric -> {$btype -> [$i]}) ;
                #$sth -> bind_param ($i+1, $bval -> [$i], $btype -> [$i]) ;
                #$sth -> bind_param ($i+1, $bval -> [$i], $btype -> [$i] 
== DBI::SQL_CHAR()?DBI::SQL_CHAR():undef ) ;
        my $bt = $btype -> [$i] ;
                $sth -> bind_param ($i+1, $bval -> [$i], (defined ($bt) 
&& $bt <= DBI::SQL_CHAR())?{TYPE=>$bt}:undef ) ;
                }
            $ret = $sth -> execute ;
            }


>I think that I just moved the problem to another area. Could you look into 
>this ?
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org


Mime
View raw message