From 8356d9498860cd377eb1edd8b64a840b6b411081 Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Wed, 26 Jun 2013 19:51:56 -0400 Subject: [PATCH] Document effect of constant folding on CASE. Back-patch to all supported versions. Laurenz Albe --- doc/src/sgml/func.sgml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index d295ec2521..bbd6605c99 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -9981,6 +9981,16 @@ SELECT a, SELECT ... WHERE CASE WHEN x <> 0 THEN y/x > 1.5 ELSE false END; + + + + As described in , functions and + operators marked IMMUTABLE 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. + + -- 2.50.0