Skip to content

Commit 8356d94

Browse files
committed
Document effect of constant folding on CASE.
Back-patch to all supported versions. Laurenz Albe
1 parent 1c6afc4 commit 8356d94

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

doc/src/sgml/func.sgml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9981,6 +9981,16 @@ SELECT a,
99819981
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END;
99829982
</programlisting>
99839983
</para>
9984+
9985+
<note>
9986+
<para>
9987+
As described in <xref linkend="xfunc-volatility">, functions and
9988+
operators marked <literal>IMMUTABLE</literal> can be evaluated when
9989+
the query is planned rather than when it is executed. This means
9990+
that constant parts of a subexpression that is not evaluated during
9991+
query execution might still be evaluated during query planning.
9992+
</para>
9993+
</note>
99849994
</sect2>
99859995

99869996
<sect2 id="functions-coalesce-nvl-ifnull">

0 commit comments

Comments
 (0)