diff options
author | Noah Misch <noah@leadboat.com> | 2013-06-26 19:51:56 -0400 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2013-06-26 19:51:56 -0400 |
commit | d53f7cf11658a3252a6fddf308b992b751379f09 (patch) | |
tree | 6c11b3ecd1e8cd0cee41fdbb4fba14a3622b3027 | |
parent | 5f538ad004aa00cf0881f179f0cde789aad4f47e (diff) | |
download | postgresql-d53f7cf11658a3252a6fddf308b992b751379f09.tar.gz postgresql-d53f7cf11658a3252a6fddf308b992b751379f09.zip |
Document effect of constant folding on CASE.
Back-patch to all supported versions.
Laurenz Albe
-rw-r--r-- | doc/src/sgml/func.sgml | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 4c5af4b83c8..8cf53855616 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -10563,6 +10563,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"> |