8000 Document effect of constant folding on CASE. · sqlparser/postgres@d5ce393 · GitHub
[go: up one dir, main page]

Skip to content

Commit d5ce393

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

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
@@ -9136,6 +9136,16 @@ SELECT a,
91369136
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END;
91379137
</programlisting>
91389138
</para>
9139+
9140+
<note>
9141+
<para>
9142+
As described in <xref linkend="xfunc-volatility">, functions and
9143+
operators marked <literal>IMMUTABLE</literal> can be evaluated when
9144+
the query is planned rather than when it is executed. This means
9145+
that constant parts of a subexpression that is not evaluated during
9146+
query execution might still be evaluated during query planning.
9147+
</para>
9148+
</note>
91399149
</sect2>
91409150

91419151
<sect2>

0 commit comments

Comments
 (0)
0