Re: How to create a multi-column index with 2 dates using 'gist'?

From: Gerhard Heift <ml-postgresql-20081012-3518(at)gheift(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to create a multi-column index with 2 dates using 'gist'?
Date: 2009-08-26 14:26:13
Message-ID: 20090826142518.GB3549@gheift.kawo1.rwth-aachen.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-performance

On Mon, Aug 24, 2009 at 05:24:59PM +0800, Fred Janon wrote:
> Hi,
>
> I am using 8.3 and pgAdmin III. I have a couple of tables using 2 DATE columns
> like 'startdate' and 'enddate' (just date, not interested in time in these
> columns). I have some queries (some using OVERLAPS) involving both 'startdate'
> and 'enddate' columns. I tried to create a multi column index using pgAdmin and
> it comes back with this error:
>
> ERROR: data type date has no default operator class for access method "gist"
> HINT: You must specify an operator class for the index or define a default
> operator class for the data type.
>
> I search the pdf docs and online without finding what an "operator class" for
> DATE would be. Would a multi-column index help in that case (OVERLAPS and dates
> comparison) anyway? Or should I just define an index for each of the dates?
>
> Below are the table and index defintions.

Have a look at http://pgfoundry.org/projects/temporal

But currently there is no way to avoid overlapping of such periods :(

> Thanks
>
> Fred

Regards,
Gerhard

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alban Hertroys 2009-08-26 14:55:18 Re: Tagged types module and varlena changes
Previous Message xaviergxf 2009-08-26 14:13:41 Creating index for convert text to integer

Browse pgsql-performance by date

  From Date Subject
Next Message Jean-Michel Pouré 2009-08-26 14:40:31 PostgreSQL does CAST implicitely between int and a domain derived from int
Previous Message Matthew Wakeling 2009-08-26 14:07:45 Re: Fwd: How to create a multi-column index with 2 dates using 'gist'?