Index: openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql,v
diff -u -r1.23 -r1.24
--- openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql	19 Dec 2001 18:33:22 -0000	1.23
+++ openacs-4/packages/acs-kernel/sql/postgresql/postgresql.sql	30 Dec 2001 14:52:43 -0000	1.24
@@ -22,10 +22,10 @@
         
         if dir < 0 then
            v_inc := \-1;
-           v_i   := v_len + 1 - dir;
+           v_i   := v_len;
         else 
            v_inc := 1;
-           v_i   := dir;
+           v_i   := 1;
         end if;
            
         while v_i > 0 and v_i <= v_len LOOP
