Re: Indexing timestamps - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Indexing timestamps
Date
Msg-id 20020606152814.P30776-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Indexing timestamps  (Josh Berkus <josh@agliodbs.com>)
Responses Re: Indexing timestamps  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-sql
On Thu, 6 Jun 2002, Josh Berkus wrote:

>
> Stephan,
>
> > Unfortunately you can't do that in that sort of syntax.  You'll
> > need to create a function that returns the month and is marked
> > as iscachable and use that function in the index creation and
> > query.
>
> Hmmm.  I take it that NOW() is not ISCACHABLE, and that's Andre's indexing
> problem?   What would be the pitfall of creating an alternate version of
> NOW() that ISCACHABLE?

I believe it was not marked as iscachable.  I think it's now marked as
static in dev sources which I would guess would mean that it could
consider an index scan.  I think with care an iscachable function that
just called now() would probably be safe for interactive queries.



pgsql-sql by date:

Previous
From: Manfred Koizar
Date:
Subject: Re: Old documentation
Next
From: Bruce Momjian
Date:
Subject: Re: PL/pgSQL TODO