Received: from sss.pgh.pa.us (tlane-gw0.cust.stargate.net [209.114.132.154]) by hub.org (8.10.1/8.10.1) with ESMTP id e8HIHUs19732 for ; Sun, 17 Sep 2000 14:17:30 -0400 (EDT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.0/8.11.0) with ESMTP id e8HIGNB06825; Sun, 17 Sep 2000 14:16:23 -0400 (EDT) To: Philip Warner cc: pgsql-sql@postgresql.org Subject: Re: Does optimizer know about 'constant' expressions? In-reply-to: <3.0.5.32.20000917184319.02976b40@mail.rhyme.com.au> References: <3.0.5.32.20000917184319.02976b40@mail.rhyme.com.au> Comments: In-reply-to Philip Warner message dated "Sun, 17 Sep 2000 18:43:19 +1000" Date: Sun, 17 Sep 2000 14:16:23 -0400 Message-ID: <6821.969214583@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200009/126 Philip Warner writes: > It seems that the optimizer does not know about (or calculate values of) > constant expressions when determining strategy. Datetime calculations are not considered constant-foldable. See prior discussions, eg thread "Constant propagation and similar issues" in pghackers on 11-Sep. regards, tom lane