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

Lines changed: 8 additions & 8 deletions
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy