Forum OpenACS Q&A: Response to sec_rotate_last_visit

Collapse
Posted by Andrew Piskorski on
I believe Oracle looks only at the function name when replacing functions, not the signature. Yep, that seems to be true, e.g.:
SQL> create or replace function atp_test
return integer
is
begin
  return 0;
end;
/
show errors
  2    3    4    5    6    7  
Function created.
SQL> No errors.

SQL> select atp_test from dual;
  ATP_TEST
----------
	 0

SQL> select atp_test(1) from dual;
select atp_test(1) from dual
       *
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'ATP_TEST'

SQL> create or replace function atp_test (
  v_id  in  integer
) return integer
is
begin
  return v_id;
end;
/
show errors
  2    3    4    5    6    7    8  
Function created.
SQL> No errors.

SQL> select atp_test from dual;
select atp_test from dual
       *
ERROR at line 1:
ORA-06553: PLS-306: wrong number or types of arguments in call to 'ATP_TEST'

SQL> select atp_test(1) from dual;
ATP_TEST(1)
-----------
	  1