X-Original-To: pgsql-sql@postgresql.org Received: from sss.pgh.pa.us (unknown [192.204.191.242]) by postgresql.org (Postfix) with ESMTP id BDB18475C15 for ; Mon, 10 Mar 2003 10:07:32 -0500 (EST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.8/8.12.8) with ESMTP id h2AF7Wub017310; Mon, 10 Mar 2003 10:07:32 -0500 (EST) To: Andre Schubert Cc: achill@matrix.gatewaynet.com, pgsql-sql@postgresql.org Subject: Re: Help on indexing timestamps In-reply-to: <20030310101750.77a1ae2f.andre@km3.de> References: <20030307130223.5a58c132.andre@km3.de> <20030307134702.135fa254.andre@km3.de> <264.1047049503@sss.pgh.pa.us> <20030310101750.77a1ae2f.andre@km3.de> Comments: In-reply-to Andre Schubert message dated "Mon, 10 Mar 2003 10:17:50 +0100" Date: Mon, 10 Mar 2003 10:07:32 -0500 Message-ID: <17309.1047308852@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200303/242 X-Sequence-Number: 12282 Andre Schubert writes: > Tom Lane wrote: >> Update to 7.3, and that problem will go away. >> > What is the difference between 7.2 and 7.3 related to my problem ? 7.3 is willing to index comparisons to now(), that's what ;-) You may care to study the difference between cachable/noncachable functions in 7.2, versus the difference between immutable/stable/volatile functions in 7.3. 7.2 has to treat now() as noncachable and therefore unsafe to index. 7.3 treats it as stable and therefore safe to index. You can work around this in 7.2 by cheating with subselects or wrapper functions, but that's a poor substitute for a real solution. regards, tom lane