Skip to content

Commit 1f3fbce

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

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
@@ -10060,6 +10060,16 @@ SELECT a,
1006010060
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END;
1006110061
</programlisting>
1006210062
</para>
10063+
10064+
<note>
10065+
<para>
10066+
As described in <xref linkend="xfunc-volatility">, functions and
10067+
operators marked <literal>IMMUTABLE</literal> can be evaluated when
10068+
the query is planned rather than when it is executed. This means
10069+
that constant parts of a subexpression that is not evaluated during
10070+
query execution might still be evaluated during query planning.
10071+
</para>
10072+
</note>
1006310073
</sect2>
1006410074

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

0 commit comments

Comments
 (0)