Clarify STABLE function documentation to highlight how such functions
authorBruce Momjian <[email protected]>
Thu, 19 Jan 2006 22:52:20 +0000 (22:52 +0000)
committerBruce Momjian <[email protected]>
Thu, 19 Jan 2006 22:52:20 +0000 (22:52 +0000)
can be optimized.

doc/src/sgml/xfunc.sgml

index 572adc2105d844d05f59012a6f8a180e69ec2ba2..0c5354219783105a8804cc666f41da76a3748337 100644 (file)
@@ -899,13 +899,13 @@ CREATE FUNCTION test(int, int) RETURNS int
      <para>
       A <literal>STABLE</> function cannot modify the database and is
       guaranteed to return the same results given the same arguments
-      for all calls within a single surrounding query.  This category
-      allows the optimizer to optimize away multiple calls of the function
-      within a single query.  In particular, it is safe to use an expression
-      containing such a function in an index scan condition.  (Since an
-      index scan will evaluate the comparison value only once, not once at
-      each row, it is not valid to use a <literal>VOLATILE</> function in
-      an index scan condition.)
+      for all rows within a single statement. This category allows the
+      optimizer to optimize multiple calls of the function to a single
+      call. In particular, it is safe to use an expression containing
+      such a function in an index scan condition. (Since an index scan
+      will evaluate the comparison value only once, not once at each
+      row, it is not valid to use a <literal>VOLATILE</> function in an
+      index scan condition.)
      </para>
     </listitem>
     <listitem>