Forum OpenACS Q&A: Re: OpenACS 4.6 does not yet work with Oracle 9i?

Collapse
Posted by Andrew Grumet on
You can actually preserve the function signatures though this has a kind of band-aid quality to it. The trick is to disambiguate by declaring a new variable, assigning it to the parameter passed in, and henceforth using the new variable. So the revised content-folder.delete, for example, would look like this
procedure delete (
  folder_id     in cr_folders.folder_id%TYPE
) is

  v_count integer;
  v_parent_id integer;
*  v_folder_id integer;

begin
*  v_folder_id := folder_id;


  -- check if the folder contains any items

  [snip snip snip]

  content_folder.unregister_content_type(
*      folder_id        => v_folder_id,
      content_type     => 'content_revision',
      include_subtypes => 't' );

  delete from cr_folder_type_map
*    where folder_id = v_folder_id;

  [etc etc etc]
end delete;
where new/changed code is marked with a * (I would have used color but it looks like FONT tags are disallowed).

I used this approach on my personal site as a one-off since it's on an already-dead codebase (Classic ACS 4.2).

Oh, also there are a few cases where this approach falls down due to the use of the dot notation in cursor declarations. The trick is to declare the cursor inline (for cur in (select ...) loop) instead of in the declaration block.