Skip to content

Commit d53f7cf

Browse files
committed
Document effect of constant folding on CASE.
Back-patch to all supported versions. Laurenz Albe
1 parent 5f538ad commit d53f7cf

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
@@ -10563,6 +10563,16 @@ SELECT a,
1056310563
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END;
1056410564
</programlisting>
1056510565
</para>
10566+
10567+
<note>
10568+
<para>
10569+
As described in <xref linkend="xfunc-volatility">, functions and
10570+
operators marked <literal>IMMUTABLE</literal> can be evaluated when
10571+
the query is planned rather than when it is executed. This means
10572+
that constant parts of a subexpression that is not evaluated during
10573+
query execution might still be evaluated during query planning.
10574+
</para>
10575+
</note>
1056610576
</sect2>
1056710577

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

0 commit comments

Comments
 (0)