From ee4ae6ceb2e5722d1c4c2d5888f7697141d6a046 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <peter_e@gmx.net>
Date: Wed, 3 Sep 2003 22:17:07 +0000
Subject: [PATCH] Add note that a for loop where the lower bound is greater
 than the upper bound is valid but does nothing.

suggested by Richard Huxton <dev@archonet.com>
---
 doc/src/sgml/plpgsql.sgml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/doc/src/sgml/plpgsql.sgml b/doc/src/sgml/plpgsql.sgml
index 4cf4d6c31aa..e9573736ab7 100644
--- a/doc/src/sgml/plpgsql.sgml
+++ b/doc/src/sgml/plpgsql.sgml
@@ -1,5 +1,5 @@
 <!--
-$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.21 2003/08/31 17:32:19 petere Exp $
+$Header: /cvsroot/pgsql/doc/src/sgml/plpgsql.sgml,v 1.22 2003/09/03 22:17:07 petere Exp $
 -->
 
 <chapter id="plpgsql"> 
@@ -1669,6 +1669,11 @@ FOR i IN REVERSE 10..1 LOOP
 END LOOP;
 </programlisting>
        </para>
+
+       <para>
+        If the lower bound is greater than the upper bound, the loop body is not
+        executed at all, but no error is raised.
+       </para>
      </sect3>
    </sect2>
 
-- 
GitLab