Select/update array() of number

From: Bruce Hartleben (Bruce.Hartleben_at_ox.com)
Date: 06/22/04


Date: Tue, 22 Jun 2004 11:38:13 -0400
To: dbi-users@perl.org

Goal:
Array operations (equivalent to shift, memcpy or push/pop) are quite CPU-intensive on the server-side, so I'm trying to load arrays client-side and take advantage of perl's speed. I get errors when I try to read an "array() of number" into perl.

Versions:
Perl v5.8.0 built for sun4-solaris
DBI v1.3
DBD:Oracle v1.15
Oracle 9i

SQL:
create type a_number1k as array(1000) of number;
create table tmp_arrays ( iv a_number1k );

Perl:
...
$dbh = DBI->connect( $dbname, $login, $password ) or die "ERROR: Cannot connect to Oracle in db_connect()";
$sth = $dbh->prepare( "select iv from tmp_arrays" );
...

Output:
DBD::Oracle::db prepare failed: ERROR OCIDefineObject call needed but not implemented yet [for statement ``select iv from tmp_arrays''])

Question:
How can I load an array into perl then write it back to Oracle? I'm dealing with 200 million arrays. Is there a way to keep it in binary form, e.g., cast it to/from a BLOB?

Thank you for your help!

Bruce Hartleben



Relevant Pages

  • Re: Perl and Oracle
    ... Oracle program interfaces for C, C++ and Java certainly do support array ... Perl write to that fifo. ...
    (comp.databases.oracle.server)
  • Re: SQLPlus with Perl
    ... knowledge of the Perl programming language. ... The stuff within qxis a UNIX command string. ... the sql to sqlplus. ... this by assignment to an array. ...
    (comp.lang.perl.misc)
  • Re: Is perl better? :(((
    ... >> Oracle on one box, Java and perl on another. ... See previous answer about SQL. ...
    (comp.lang.java.databases)
  • Re: Is perl better? :(((
    ... >> Oracle on one box, Java and perl on another. ... See previous answer about SQL. ...
    (comp.lang.java.programmer)
  • Re: ANNOUNCE: DBD:Oracle 1.18
    ... Well a warning in one compiler is better than and error in an other so I ... This might be a problem more with the older oracle OCI in your client. ... perl -Mblib t/26exe_array.t ...
    (perl.dbi.users)