ID: 47557 Updated by: [email protected] Reported By: biton at compuserve dot com -Status: Open +Status: Bogus Bug Type: OCI8 related Operating System: * PHP Version: 5.2.9 -Assigned To: +Assigned To: sixd New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php This is a expected with the current OCI8 implementation. Code patches to improve PL/SQL object & type support are welcome. Previous Comments: ------------------------------------------------------------------------ [2009-03-04 10:34:31] biton at compuserve dot com Description: ------------ oci_new_collection() works fine on a 'TYPE' created by a user. However, if the 'TYPE' is created as part of a package, oci_new_collection() appears not to find it. <?php $c = oci_pconnect(...); // Works. sql = 'create or replace type email_array as varray(200) of varchar2(20); $s = oci_parse($c, $sql); oci_execute($s, $sql); $collec = oci_new_collection($c, 'EMAIL_ARRAY'); // Fails sql = 'create or replace type package.email_array as varray(200) of varchar2(20); $s = oci_parse($c, $sql); oci_execute($s, $sql); $collec = oci_new_collection($c, 'PACKAGE.EMAIL_ARRAY'); ?> If the TYPE is created as part of the package (and not through PHP), this also fails. Any combination of user/package/type_name appears not to work. The workaround is to create a TYPE in teh user global area of the same type as that in the package, and use that in a wrapper PL/SQL block. While this works... it kindda defeats the point behind packages. Reproduce code: --------------- --- >From manual page: function.oci-new-collection --- ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47557&edit=1
