Forum OpenACS Q&A: File storage drop and acs_sc_impl_alias__delete

I have RH6.2/PG7.1.3/OpenACS4.x installation. I was hoping that someone can point me in the direction or help me understand the following:

I loaded the file-storage package (CVS from 2/25). It did not work so I wanted to drop it and load a previous working version that I have. When I tried to drop it I got the following Error:

ERROR:  Function 'acs_sc_impl_alias__delete(unknown, unknown, 
unknown)' does not exist 
Unable to identify a function that satisfies the given argument types
You may need to add explicit typecasts

When I looked at acs_sc_impl_alias__delete in acs-sc-packages-create.sql I saw the following:

create function acs_sc_impl_alias__delete(varchar,varchar)
  returns integer as '
  declare
      p_impl_contract_name        alias for $1;
      p_impl_name                 alias for $2;
      p_impl_operation_name       alias for $3;
      v_impl_id                   integer;
  begin

      v_impl_id := acs_sc_impl__get_id(p_impl_name);

      delete from acs_sc_impl_aliases 
      where impl_contract_name = p_impl_contract_name 
      and impl_name = p_impl_name
      and impl_operation_name = p_impl_operation_name;

      return v_impl_id;

  end;' language 'plpgsql';

When looking at file-storage-sc-drop.sql it has drops like:

select acs_sc_impl_alias__delete(
           'FtsContentProvider',                -- impl_contract_name
           'file_storage_object',                 -- impl_name
           'datasource'                         -- impl_operation_name
           );

Is there a reason why file-storage-sc-drop.sql sends three agruments to acs_sc_impl_alias__delete when it appears to need two?

Is there a reason why acs_sc_impl_alias__delete sends one argument to acs_sc_impl__get_id when it appears to need two?

Thank you for your help.

Collapse
Posted by Dave Bauer on
Nope, it's a bug. There is a patch already submitted in the sdm. [1]

[1] https://openacs.org/sdm/one-patch.tcl?patch_id=168

Collapse
Posted by Don Baccus on
And I've just applied and committed the patch, thanks, Dave.  I've also fixed at least one file storage problem (a bad query snuck in somehow) but haven't committed that yet, not until I do some testing.