Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 807cb00

Browse files
committed
Clarify STABLE function documentation to highlight how such functions
can be optimized.
1 parent efbe674 commit 807cb00

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

doc/src/sgml/xfunc.sgml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.109 2005/11/29 01:46:54 alvherre Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/xfunc.sgml,v 1.110 2006/01/19 22:52:08 momjian Exp $
33
-->
44

55
<sect1 id="xfunc">
@@ -899,13 +899,13 @@ CREATE FUNCTION test(int, int) RETURNS int
899899
<para>
900900
A <literal>STABLE</> function cannot modify the database and is
901901
guaranteed to return the same results given the same arguments
902-
for all calls within a single surrounding query. This category
903-
allows the optimizer to optimize away multiple calls of the function
904-
within a single query. In particular, it is safe to use an expression
905-
containing such a function in an index scan condition. (Since an
906-
index scan will evaluate the comparison value only once, not once at
907-
each row, it is not valid to use a <literal>VOLATILE</> function in
908-
an index scan condition.)
902+
for all rows within a single statement. This category allows the
903+
optimizer to optimize multiple calls of the function to a single
904+
call. In particular, it is safe to use an expression containing
905+
such a function in an index scan condition. (Since an index scan
906+
will evaluate the comparison value only once, not once at each
907+
row, it is not valid to use a <literal>VOLATILE</> function in an
908+
index scan condition.)
909909
</para>
910910
</listitem>
911911
<listitem>

0 commit comments

Comments
 (0)