Document effect of constant folding on CASE.
authorNoah Misch
Wed, 26 Jun 2013 23:51:56 +0000 (19:51 -0400)
committerNoah Misch
Thu, 27 Jun 2013 00:33:40 +0000 (20:33 -0400)
Back-patch to all supported versions.

Laurenz Albe

doc/src/sgml/func.sgml

index 4309cbf520d605ef2a246bc6dba808180405ebcb..14a1c770a11e9f6e55d79890383f8bab01e1f65c 100644 (file)
@@ -10060,6 +10060,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.
+    
+