Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-drop.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-drop.sql,v diff -u -r1.13 -r1.14 --- openacs-4/packages/file-storage/sql/postgresql/file-storage-drop.sql 5 Dec 2009 02:08:14 -0000 1.13 +++ openacs-4/packages/file-storage/sql/postgresql/file-storage-drop.sql 30 Mar 2013 22:50:45 -0000 1.14 @@ -15,12 +15,18 @@ -- content repository is set up to cascade, so we should just have to -- delete the root folders -- -create function inline_0() -returns integer as ' -declare + + +-- +-- procedure inline_0/0 +-- +CREATE OR REPLACE FUNCTION inline_0( + +) RETURNS integer AS $$ +DECLARE rec_root_folder record; template_id integer; -begin +BEGIN for rec_root_folder in select package_id @@ -32,13 +38,14 @@ end loop; -- Unregister the content template - template_id := content_type__get_template(''file_storage_object'',''public''); + template_id := content_type__get_template('file_storage_object','public'); - perform content_type__unregister_template (''file_storage_object'', template_id, ''public''); + perform content_type__unregister_template ('file_storage_object', template_id, 'public'); perform content_template__del(template_id); return 0; -end;' language 'plpgsql'; +END; +$$ LANGUAGE plpgsql; select inline_0(); drop function inline_0();