Forum .LRN Q&A: Response to More fixes for Postgres port

Collapse
Posted by Dan Chak on
Janine,

Thanks for pointing us at this bug.  The fix of checking p_archive_p may appear to work, but it will probably cause errors down the road.  The real problem here was that the call to define_function_args for dotlrn_community__new had some parameters out of order, so when package_instantiate_object is called for a dotlrn_community, a different parameter was being passed as p_archive_p than what would have been expected.

define_function_args also has the facility for defining default values for use by package_instantiate_object.  You can specify these by adding a ";default_value" in the parameter list after the parameter to receive a default value.  The updated define_function_args for dotlrn_community__new, with a default of 'f' for p_archive_p is:

select define_function_args('dotlrn_community__new','community_id,parent_community_id,community_type,community_key,pretty_name,description,archived_p;f,portal_id,non_member_portal_id,package_id,join_policy,creation_date,creation_user,creation_ip,context_id');

You can copy this line into plsql and it will override the old define_function_args.