Re: Grouping by date range - Mailing list pgsql-general

From Alvaro Herrera
Subject Re: Grouping by date range
Date
Msg-id 20030819181831.GB4939@dcc.uchile.cl
Whole thread Raw
In response to Re: Grouping by date range  (Jeffrey Melloy <jmelloy@visualdistortion.org>)
List pgsql-general
On Tue, Aug 19, 2003 at 12:07:57PM -0500, Jeffrey Melloy wrote:
> Alexander Litvinov wrote:
>
> >if you need to handle large number of rows try to add columns with year
> >and month, write triggers for filling this columns, make indexes and
> >things should be fast.
>
> Is this the only way to do it?  I was running into this problem, too.
> It would be nice if the function indexes could handle things like
> 'date_part('month', <columname>)

That's why they can in the upcoming 7.4...  In the meantime I think you
can create an index using a function that has the constants inline, i.e.
a function date_part_month(), etc.

--
Alvaro Herrera (<alvherre[a]dcc.uchile.cl>)
"Es filosofo el que disfruta con los enigmas" (G. Coli)

pgsql-general by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: Why lower's not accept an AS declaration ?
Next
From: The Hermit Hacker
Date:
Subject: Re: move to usenet?