Skip to content

Commit ca17001

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

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
@@ -9290,6 +9290,16 @@ SELECT a,
92909290
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END;
92919291
</programlisting>
92929292
</para>
9293+
9294+
<note>
9295+
<para>
9296+
As described in <xref linkend="xfunc-volatility">, functions and
9297+
operators marked <literal>IMMUTABLE</literal> can be evaluated when
9298+
the query is planned rather than when it is executed. This means
9299+
that constant parts of a subexpression that is not evaluated during
9300+
query execution might still be evaluated during query planning.
9301+
</para>
9302+
</note>
92939303
</sect2>
92949304

92959305
<sect2>

0 commit comments

Comments
 (0)