I open this post to comment one error I found on fs::get_root_folder function when I tried to
mount xowiki outside of dotlrn on oracle. Thanks to Gustaf I can do it but He said me that the return value is different between PostgreSQL and oracle on this function.
I'm searched this and I found that:
- PostgreSQL return empty string when no rows are found and call to db_exec_plsql works correctly, but Oracle return one error if no rows are found.
create function inline_0() returns integer as '
declare
v_folder_id integer;
begin
select folder_id into v_folder_id
from fs_root_folders
where package_id = 123;
return v_folder_id;
end;
' language 'plpgsql';
select inline_0();
Function on oracle and error.
declare
2 v_folder_id integer;
3 begin
4 select folder_id into v_folder_id
5 from fs_root_folders
6 where package_id = 123;
7 end;
8 /
declare
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at line 4
If I'm coding
return [db_exec_plsql sql_function {}]
then I get empty string for PostgreSQL and I get a error for Oracle.
I want fix this error but I think that the solution isn't trivial. Maybe it should fixed on openacs because I think that it's no only for fs::get_root_folder function.