June 13, 2011

Maximum parameters in a procedure in PERL

 $create = "Create or replace procedure ";  
 $body = "\nbegin\n null;\n";  
 $statement = $create."foo(";  
 for ($x=0;$x<8188;$x++){  
 $statement .= "a$x in varchar2,\n ";  
 $statement .= "done in varchar2)\n as";  
 print FOO $statement.$body."end;";  
 close FOO;  
at 8187 parameters it compiled. at 8188 it gave a program to large error. its  tested body length by adding "null;" to the body 10,000 times and it didn't mind. One other thing is the 2499 character limit per line.