summaryrefslogtreecommitdiff
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 20:33:47 -0400
commit8356d9498860cd377eb1edd8b64a840b6b411081 (patch)
treeabc2d6d27332359ad4ae32173c8c9ecec6123e46
parent1c6afc40f7f9e3fd823e415adbfa6b2ac6f9864d (diff)
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 d295ec25210..bbd6605c993 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -9981,6 +9981,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">