postgres.git / summary / log / commit / refs
commit d5ce39365f8b014e76277af6f6d9b0cd80691e1d
Author: Noah Misch <noah@leadboat.com>
Date: Wed Jun 26 23:51:56 2013 +0000
First released in: 9.4.0, 8.4.18, 9.0.14, 9.1.10, 9.2.5, 9.3.0
Document effect of constant folding on CASE.
Back-patch to all supported versions.
Laurenz Albe
doc/src/sgml/func.sgml | 10 ++++++++++
1 file changed, 10 insertions(+)
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>
[parent: 98be2b5611d7]