Forum OpenACS Development: content_item relations are not existing

Hi everyone Ive got another question regarding the drop file for the data models. I keep on getting error messages warning that some relations dont exist. The problem is that these relations are found in the acs-content-repository. The error message is:
psql:wp-slim-drop1.sql:49: NOTICE:  identifier
"content_folder__unregister_content_type" will be truncated to
"content_folder__unregister_cont" 
psql:wp-slim-drop1.sql:49: ERROR:  Relation 'content_item' does not
exist
And the section of the code that is giving me this message is:
create function inline_2 ()
returns integer as'
begin
  PERFORM
content_folder__unregister_content_type(content_item.c_root_folder_id,''cr_wp_attachment'',''f'');
return 0;
end;' language 'plpgsql';
select inline_2 ();
drop function inline_2 ();
I am wondering whether maybe I might be doing something wrong within the code itself. If anyone can help me out with this it would be a great help. Thanks Jack

    
  
Collapse
Posted by Vinod Kurup on
Hi Jack,

In the oracle version of the CR, c_root_folder is a package constant. Since PG doesn't have 'packages', it's been recoded as a view - content_item_globals.c_root_folder_id (see the top of the file acs-content-repository/sql/postgresql/content-item.sql)

so you should do:

PERFORM content_folder__unregister_content_type(content_item_globals.c_root_folder_id ...);
Collapse
Posted by Jack Purswani on
Thanks a lot. It works.