mirror of
https://git.postgresql.org/git/postgresql.git
synced 2024-10-07 06:16:51 +02:00
Document effect of constant folding on CASE.
Back-patch to all supported versions. Laurenz Albe
This commit is contained in:
parent
dc22b34f86
commit
40265e3446
@ -10563,6 +10563,16 @@ SELECT a,
|
|||||||
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END;
|
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END;
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
<note>
|
||||||
|
<para>
|
||||||
|
As described in <xref linkend="xfunc-volatility">, functions and
|
||||||
|
operators marked <literal>IMMUTABLE</literal> can be evaluated when
|
||||||
|
the query is planned rather than when it is executed. This means
|
||||||
|
that constant parts of a subexpression that is not evaluated during
|
||||||
|
query execution might still be evaluated during query planning.
|
||||||
|
</para>
|
||||||
|
</note>
|
||||||
</sect2>
|
</sect2>
|
||||||
|
|
||||||
<sect2 id="functions-coalesce-nvl-ifnull">
|
<sect2 id="functions-coalesce-nvl-ifnull">
|
||||||
|
Loading…
Reference in New Issue
Block a user