From: Noah Misch Date: Wed, 26 Jun 2013 23:51:56 +0000 (-0400) Subject: Document effect of constant folding on CASE. X-Git-Tag: REL9_0_14~38 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ca1700130be70d6b2c5dfcabbf0717036bf6bded;p=thirdparty%2Fpostgresql.git Document effect of constant folding on CASE. Back-patch to all supported versions. Laurenz Albe --- diff --git a/doc/src/sgml/func.sgml b/doc/src/sgml/func.sgml index 29576d7ca32..36ec0691b5d 100644 --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -9290,6 +9290,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. + +