Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c2faa1

Browse files
committed
Emphasize that immutable and stable functions are not allowed to modify
the database. xfunc.sgml was already pretty definite on the point, butit doesn't hurt to make it clear here too.
1 parent33556af commit2c2faa1

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

‎doc/src/sgml/ref/create_function.sgml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!--
2-
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.69 2006/11/03 07:17:36 tgl Exp $
2+
$PostgreSQL: pgsql/doc/src/sgml/ref/create_function.sgml,v 1.70 2006/11/10 20:52:18 tgl Exp $
33
-->
44

55
<refentry id="SQL-CREATEFUNCTION">
@@ -198,15 +198,15 @@ CREATE [ OR REPLACE ] FUNCTION
198198

199199
<listitem>
200200
<para>
201-
These attributes inform the system whether it is safe to
202-
replace multiple evaluations of the function with a single
203-
evaluation, for run-time optimization. At most one choice
201+
These attributes inform the query optimizer about the behavior
202+
of the function. At most one choice
204203
may be specified. If none of these appear,
205204
<literal>VOLATILE</literal> is the default assumption.
206205
</para>
207206

208207
<para>
209-
<literal>IMMUTABLE</literal> indicates that the function always
208+
<literal>IMMUTABLE</literal> indicates that the function
209+
cannot modify the database and always
210210
returns the same result when given the same argument values; that
211211
is, it does not do database lookups or otherwise use information not
212212
directly present in its argument list. If this option is given,
@@ -215,8 +215,9 @@ CREATE [ OR REPLACE ] FUNCTION
215215
</para>
216216

217217
<para>
218-
<literal>STABLE</literal> indicates that within a single table scan
219-
the function will consistently
218+
<literal>STABLE</literal> indicates that the function
219+
cannot modify the database,
220+
and that within a single table scan it will consistently
220221
return the same result for the same argument values, but that its
221222
result could change across SQL statements. This is the appropriate
222223
selection for functions whose results depend on database lookups,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp