Index: openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-5.1.0a3-5.1.0a4.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-5.1.0a3-5.1.0a4.sql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-5.1.0a3-5.1.0a4.sql	12 Jul 2004 14:49:58 -0000	1.2
+++ openacs-4/packages/file-storage/sql/postgresql/upgrade/upgrade-5.1.0a3-5.1.0a4.sql	30 Mar 2013 22:50:45 -0000	1.3
@@ -1,21 +1,23 @@
 
-create or replace function file_storage__move_file (
-       --
-       -- Move a file (ans all its versions) to a different folder.
-       -- Wrapper for content_item__move
-       -- 
-       integer,         -- cr_folders.folder_id%TYPE,
-       integer,         -- cr_folders.folder_id%TYPE
-       integer,         -- ceration_user
-       varchar          -- creation_ip
-) returns integer as '  -- 0 for success 
-declare
-        move_file__file_id              alias for $1;
-        move_file__target_folder_id     alias for $2;
-        move_file__creation_user        alias for $3;
-        move_file__creation_ip          alias for $4;
-begin
 
+
+-- added
+select define_function_args('file_storage__move_file','file_id,target_folder_id,creation_user,creation_ip');
+
+--
+-- procedure file_storage__move_file/4
+--
+CREATE OR REPLACE FUNCTION file_storage__move_file(
+   move_file__file_id --          integer,
+   move_file__target_folder_id integer,
+   move_file__creation_user integer,
+   move_file__creation_ip varchar
+
+) RETURNS integer AS $$
+-- 0 for success
+DECLARE
+BEGIN
+
         perform content_item__move(
                move_file__file_id,              -- item_id
                move_file__target_folder_id      -- target_folder_id
@@ -24,4 +26,5 @@
         perform acs_object__update_last_modified(move_file__target_folder_id,move_file__creation_user,move_file__creation_ip);
 
         return 0;
-end;' language 'plpgsql';
+END;
+$$ LANGUAGE plpgsql;
