Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-simple-package-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/Attic/file-storage-simple-package-create.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/file-storage/sql/postgresql/file-storage-simple-package-create.sql	29 May 2002 23:02:19 -0000	1.4
+++ openacs-4/packages/file-storage/sql/postgresql/file-storage-simple-package-create.sql	17 Jul 2002 20:09:47 -0000	1.5
@@ -10,12 +10,8 @@
 -- @cvs-id $Id$
 --
 
-
 select define_function_args('fs_simple_object__new','object_id,object_type;fs_simple_object,folder_id,name,description,creation_date,creation_user,creation_ip,context_id');
 
-select define_function_args('fs_simple_object__delete','object_id');
-
-
 create function fs_simple_object__new(integer,varchar,integer,varchar,varchar,timestamp,integer,varchar,integer)
 returns integer as '
 DECLARE
@@ -42,16 +38,16 @@
         insert into fs_simple_objects
         (object_id, folder_id, name, description) values
         (v_object_id, p_folder_id, p_name, p_description);
-         
+
         acs_object__update_last_modified(p_folder_id);
 
         return v_object_id;
-     
+
 END;
 ' language 'plpgsql';
 
+select define_function_args('fs_simple_object__delete','object_id');
 
-
 create function fs_simple_object__delete(integer)
 returns integer as '
 DECLARE
@@ -63,15 +59,25 @@
 END;
 ' language 'plpgsql';
 
+select define_function_args('fs_simple_object__name', 'object_id');
 
+create function fs_simple_object__name(integer)
+returns integer as '
+declare
+    p_object_id                     alias from $1;
+begin
+    return name
+    from fs_simple_objects
+    where object_id = p_object_id;
+end;
+' language 'plpgsql';
 
 select define_function_args('fs_url__new','url_id,object_type;fs_url,url,folder_id,name,description,creation_date,creation_user,creation_ip,context_id');
 
 select define_function_args('fs_url__delete','url_id');
 
 select define_function_args('fs_url__copy','url_id;target_object_id');
 
-
 create function fs_url__new(integer,varchar,varchar,integer,varchar,varchar,timestamp,integer,varchar,integer)
 returns integer as '
 DECLARE
@@ -98,7 +104,7 @@
             p_creation_ip,
             p_context_id
         );
-           
+
         insert into fs_urls
         (url_id, url) values
         (v_url_id, p_url);
@@ -171,7 +177,7 @@
             v_creation_ip,
             p_target_folder_id
         );
-           
+
         return v_new_url_id;
 END;
 ' language 'plpgsql';
