Index: openacs-4/packages/acs-kernel/sql/postgresql/lob.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/lob.sql,v
diff -u -r1.4 -r1.5
--- openacs-4/packages/acs-kernel/sql/postgresql/lob.sql	1 Jul 2004 11:29:17 -0000	1.4
+++ openacs-4/packages/acs-kernel/sql/postgresql/lob.sql	24 Jul 2004 14:44:55 -0000	1.5
@@ -91,9 +91,10 @@
         v_rec   record;
         v_data  text default '''';
 begin
-        for v_rec in select data, segment from lob_data where lob_id = p_lob_id order by segment;
+        for v_rec in select data, segment from lob_data where lob_id = p_lob_id order by segment 
+        loop
             v_data := v_data || v_rec.data;
-        end if;
+        end loop;
 
         return v_data;
 
