summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoah Misch2013-06-26 23:51:56 +0000
committerNoah Misch2013-06-26 23:53:33 +0000
commitd5ce39365f8b014e76277af6f6d9b0cd80691e1d (patch)
tree3e0bc3d368777b8cddbd2c8339824b34b4e286fb
parent98be2b5611d79cf6dcab052913dbec07f9c085b0 (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 85720cab6e4..c1c755df898 100644
--- a/doc/src/sgml/func.sgml
+++ b/doc/src/sgml/func.sgml
@@ -9136,6 +9136,16 @@ SELECT a,
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 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>