aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch <noah@leadboat.com>2013-06-26 19:51:56 -0400
committerNoah Misch <noah@leadboat.com>2013-06-26 19:51:56 -0400
commitd53f7cf11658a3252a6fddf308b992b751379f09 (patch)
tree6c11b3ecd1e8cd0cee41fdbb4fba14a3622b3027
parent5f538ad004aa00cf0881f179f0cde789aad4f47e (diff)
downloadpostgresql-d53f7cf11658a3252a6fddf308b992b751379f09.tar.gz
postgresql-d53f7cf11658a3252a6fddf308b992b751379f09.zip
Document effect of constant folding on CASE.
Back-patch to all supported versions. Laurenz Albe
-rw-r--r--doc/src/sgml/func.sgml10
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml
index 4c5af4b83c8..8cf53855616 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -10563,6 +10563,16 @@ SELECT a,
SELECT ... WHERE CASE WHEN x &lt;&gt; 0 THEN y/x &gt; 1.5 ELSE false END;
</programlisting>
</para>
+
+ <note>
+ <para>
+ As described in <xref linkend="xfunc-volatility">, functions and
+ operators marked <literal>IMMUTABLE</literal> can be evaluated when
+ the query is planned rather than when it is executed. This means
+ that constant parts of a subexpression that is not evaluated during
+ query execution might still be evaluated during query planning.
+ </para>
+ </note>
</sect2>
<sect2 id="functions-coalesce-nvl-ifnull">