Re: DBD::Oracle - closing cursors returned from PL/SQL
From: Michael A Chase tech (mchase_at_ix.netcom.com)
Date: 03/17/05
- Next message: Greg Sabino Mullane: "RE: NULL field matching problem..."
- Previous message: zzzeek: "Oracle 9i OCI + DBD::Oracle 1.16 + table index state being sticky ?"
- In reply to: Charles Jardine: "DBD::Oracle - closing cursors returned from PL/SQL"
- Next in thread: Charles Jardine: "Re: DBD::Oracle - closing cursors returned from PL/SQL"
- Reply: Charles Jardine: "Re: DBD::Oracle - closing cursors returned from PL/SQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 16 Mar 2005 18:25:42 -0800 To: Charles Jardine <cj10@cam.ac.uk>
On 03/16/2005 08:25 AM, Charles Jardine said:
> perldoc DBD::Oracle says, under "Binding Cursors":
>
>> To close the cursor you (currently) need to do this:
>>
>> $sth3 = $dbh->prepare("BEGIN CLOSE :cursor; END;");
>> $sth3->bind_param_inout(":cursor", \$sth2, 0, { ora_type =>
>> ORA_RSET } );
>> $sth3->execute;
>
>
> This works, and demonstrates that a cursor got from PL/SQL
> may be passed back to PL/SQL. However, I doubt that it is
> necessary. Tracing shows that, if I let $sth2 go out of scope,
> the destructor frees the OCI statement handle. Surely this
> will cause the cursor's resources will be released.
>
> Does anyone know why this was once thought to be necessary?
It frees the client side handle, but probably doesn't tell the RDBMS
that the cursor is no longer needed.
-- Mac :}) ** I usually forward private questions to the appropriate mail list. ** Ask Smarter: http://www.catb.org/~esr/faqs/smart-questions.html Give a hobbit a fish and he eats fish for a day. Give a hobbit a ring and he eats fish for an age.
- Next message: Greg Sabino Mullane: "RE: NULL field matching problem..."
- Previous message: zzzeek: "Oracle 9i OCI + DBD::Oracle 1.16 + table index state being sticky ?"
- In reply to: Charles Jardine: "DBD::Oracle - closing cursors returned from PL/SQL"
- Next in thread: Charles Jardine: "Re: DBD::Oracle - closing cursors returned from PL/SQL"
- Reply: Charles Jardine: "Re: DBD::Oracle - closing cursors returned from PL/SQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|