Index: openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-procs-postgresql.xql,v diff -u -r1.1.1.1 -r1.1.1.1.2.1 --- openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-procs-postgresql.xql 17 Feb 2003 20:56:15 -0000 1.1.1.1 +++ openacs-4/packages/dotlrn-homework/tcl/dotlrn-homework-procs-postgresql.xql 26 Feb 2003 02:37:40 -0000 1.1.1.1.2.1 @@ -2,67 +2,45 @@ postgresql7.1 - - - - - select 1 - where exists (select name - from cr_items - where parent_id = :parent_folder_id - and name = :title) - - - - - FIX ME PLSQL -FIX ME PLSQL - begin - :1 := file_storage__new_file ( - item_id => :file_id, - title => :title, - folder_id => :parent_folder_id, - creation_user => :user_id, - creation_ip => :creation_ip, - indb_p => :indb_p - ); - end; + select file_storage__new_file ( + :title, + :parent_folder_id, + :user_id, + :creation_ip, + :indb_p, + :file_id + ); - FIX ME PLSQL -FIX ME PLSQL - begin - :1 := file_storage__new_version ( - filename => :filename, - description => :description, - mime_type => :mime_type, - item_id => :file_id, - creation_user => :user_id, - creation_ip => :creation_ip - ); - end; + select file_storage__new_version ( + :filename, -- filename + :description, -- description + :mime_type, -- mime_type + :file_id, -- item_id + :user_id, -- creation_user + :creation_ip -- creation_ip + ); + - FIX ME LOB update cr_revisions - set content = empty_blob() + set lob = [set __lob_id [db_string get_lob_id "select empty_lob()"]] where revision_id = :revision_id - returning content into :1 @@ -72,7 +50,7 @@ update cr_revisions - set content_length = dbms_lob__getlength(content) + set content_length = lob_length(lob) where revision_id = :revision_id @@ -81,16 +59,14 @@ - FIX ME PLSQL -FIX ME PLSQL - begin - :1 := content_item__relate( - item_id => :homework_file_id, - object_id => :correction_file_id, - relation_tag => 'homework_correction' - ); - end; + select content_item__relate( + :homework_file_id, + :correction_file_id, + 'homework_correction', + null, + 'cr_item_rel' + );