mirror of
https://github.com/postgres/postgres.git
synced 2025-05-02 11:44:50 +03:00
Document effect of constant folding on CASE.
Back-patch to all supported versions. Laurenz Albe
This commit is contained in:
parent
5734eb2c92
commit
1f3fbced65
@ -10060,6 +10060,16 @@ SELECT a,
|
||||
SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END;
|
||||
</programlisting>
|
||||
</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 id="functions-coalesce-nvl-ifnull">
|
||||
|
Loading…
x
Reference in New Issue
Block a user