Forum OpenACS Development: atoi error

Collapse
Posted by Sid Widge on
ERROR: pg_atoi: error in "content_item_globals__c_root_folder_id": can't parse "content_item_globals__c_root_folder_id" Any clues ?
create function inline_9 ()
returns integer as'
begin
  PERFORM content_folder__register_content_type(
			''content_item_globals__c_root_folder_id'', 
			''cr_wp_attachment'', 
			''f'');
return 0;
end;' language 'plpgsql';
Collapse
2: Response to atoi error (response to 1)
Posted by Yon Derek on
Not that I'm an expert, but from looks of it content_folder__register_content_type() expects that the first parameter is a number but it what it gets is a string so it complains.
Collapse
3: Response to atoi error (response to 1)
Posted by Dan Wickstrom on
You have a typo. It should read:

  PERFORM content_folder__register_content_type(
                              content_item_globals.c_root_folder_id, 
                              ''cr_wp_attachment'', 
                              ''f'');