Forum OpenACS Development: Re: Differences between Oracle and PostgreSQL on db_exec_plsql function

The bug is in the function itself not db_exec_plsql.

Select into returns an exception if not rows are returned.

So in this case the function must only be passed a valid package_id or you should catch the call to db_exec_plsql i guess.

I have never seen this come up in use as an error.

Thanks Dave,

I agree with you. The function can catch error and return some value but PL/SQL only can return integer an PGSQL could return empty string or integer.

When I call to db_exec_plsql on oracle and get error should be catch inside and return some code (0,-1,...). One problem is PostgreSQL could return "".

If i call to the tcl function I can receive one integer or empty string for PostgreSQL, and integer (or error) for Oracle and no is the same behavior Ej

If { [fs::get_root_folder -package_id 123] eq "" } {
#package_id isn't exist but it work for PG and not for Oracle.
}

Maybe, It's posible to normalize calls to Oracle PL/SQL and return empty string if it get errors.

I hope, you can understand my special english 😟.