You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by Terrence Brannon <me...@urth.org> on 2004/03/13 16:18:53 UTC

Re: DBIx::Recordset - sql_type and pg_type

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


Re: new DBIx::Recordset maintainer requested

Posted by Kaare Rasmussen <ka...@kakidata.dk>.
Hi

> I do not have time to maintain Recordset.

Neither do I. But I'd want to know if you found a new maintainer. As yu know, 
I have found a bug in DBIx::Recordset and would like it to be handled 
somehow.

I've made a correction that works for me, but I'm not sure if it works for 
everybody else.

-- 
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 12.00-18.00        Email: kar@kakidata.dk
2000 Frederiksberg        Lørdag 12.00-16.00       Web:      www.suse.dk


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


Re: new DBIx::Recordset maintainer requested

Posted by Kee Hinckley <na...@somewhere.com>.
At 4:26 PM +1100 3/23/04, Angus Lees wrote:
>Whatever came of the "Can't upgrade that kind of scalar" errors with
>DBIx::Recordset and perl 5.8?
>
>Did you ask the perl core guys what they wanted to do with it?

I posted to the core maintenance folks.  I haven't been tracking it 
lately, however the conclusion appeared to be that the fix was going 
to require a binary incompatibility, which meant that it couldn't 
appear in any 5.8 release.  (The return structure isn't big enough to 
hold the necessary information.)  At the time they were talking about 
putting it into a 5.9 release.  I know that 5.9.1 is out in beta 
right now, I don't know if that particular fix is however.

>(I'm wondering whether the current "using globref as both arrayref and
>hashref" approach has a future at all..)

I believe so.  Nobody appeared to be arguing for discarding the 
ability to return a glob.  The conversation could have turned 
elsewhere, but if so I wasn't cc'd.
http://www.xray.mpe.mpg.de/cgi-bin/w3glimpse/perl5-porters?query=nazgul%40somewhere.com&errors=0&case=on&maxfiles=100&maxlines=30

I just tried searching the bug database, but I don't have a ticket 
number for it and couldn't turn it up under anything quickly.

http://rt.perl.org/rt3/
-- 
Kee Hinckley
http://www.messagefire.com/         Next Generation Spam Defense
http://commons.somewhere.com/buzz/  Writings on Technology and Society

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

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


Re: new DBIx::Recordset maintainer requested

Posted by Terrence Brannon <me...@urth.org>.
Angus Lees wrote:

>Whatever came of the "Can't upgrade that kind of scalar" errors with
>DBIx::Recordset and perl 5.8?
>  
>

Here is the URL to the root of the thread you are talking about:

   http://www.ecos.de/~mailarc/embperl/2004-01/msg00064.html

>Did you ask the perl core guys what they wanted to do with it?
>  
>

I never made such a promise...did you ever post the patch you wrote 
about here:

<quote>

I've just spent the last few days hacking around this.  The solution I
came up with (I'll post the patch on tuesday or so) was to make links
always return an array ref (tied to DBIx::Recordset), rather than the
full glob.


</quote>

>
>(I'm wondering whether the current "using globref as both arrayref and
>hashref" approach has a future at all..)
>
>  
>
There is a nice Perl package called Object::Multitype that allows for an 
object to be used as an array and hash without the glob issues... but it 
is bound to be slow.



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


Re: new DBIx::Recordset maintainer requested

Posted by Angus Lees <gu...@inodes.org>.
Whatever came of the "Can't upgrade that kind of scalar" errors with
DBIx::Recordset and perl 5.8?

Did you ask the perl core guys what they wanted to do with it?


(I'm wondering whether the current "using globref as both arrayref and
hashref" approach has a future at all..)

-- 
 - Gus


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


new DBIx::Recordset maintainer requested

Posted by Terrence Brannon <me...@urth.org>.
I am transitioning out of computer consulting and into teaching high 
school mathematics.

I do not have time to maintain Recordset.

Whoever takes it over should be ready to use SVN, Postgres, MySQL, 
SQLite, and of course Perl.



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


Re: DBIx::Recordset - sql_type and pg_type

Posted by Kaare Rasmussen <ka...@kakidata.dk>.
Hi

To follow up on this problem - the attached perl script still shows the same 
error:

Cannot specify both sql_type and pg_type at /usr/lib/perl5/site_perl/5.8.1/
DBIx/Database.pm line 149.

with the attached sql. It is for PostgreSQL 7.3.4, but I think any recent 
PostgreSQL gives the same answer.
DBD::Pg is 1.31 and Perl is 5.8.1

Hope this can give a clue.

-- 
Kaare Rasmussen            --Linux, spil,--        Tlf:        3816 2582
Kaki Data                tshirts, merchandize      Fax:        3816 2501
Howitzvej 75               Åben 12.00-18.00        Email: kar@kakidata.dk
2000 Frederiksberg        Lørdag 12.00-16.00       Web:      www.suse.dk