Index: openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql,v
diff -u -r1.50 -r1.50.2.1
--- openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql	23 Mar 2018 23:53:01 -0000	1.50
+++ openacs-4/packages/acs-content-repository/sql/postgresql/content-revision.sql	18 Jun 2021 13:57:52 -0000	1.50.2.1
@@ -506,7 +506,8 @@
                  and
                    o.object_id = r.revision_id
                  order by
-                   o.creation_date
+                   o.creation_date,
+                   r.revision_id
   LOOP
     v_row_count := v_row_count + 1;
     if rev_cur.revision_id = get_number__revision_id then 
