Re: Help on indexing timestamps - Mailing list pgsql-sql

From Tom Lane
Subject Re: Help on indexing timestamps
Date
Msg-id 17309.1047308852@sss.pgh.pa.us
Whole thread Raw
In response to Re: Help on indexing timestamps  (Andre Schubert <andre@km3.de>)
List pgsql-sql
Andre Schubert <andre@km3.de> writes:
> Tom Lane <tgl@sss.pgh.pa.us> 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


pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Cursors and backwards scans and SCROLL
Next
From: Tom Lane
Date:
Subject: Re: Optimizing view