Re: PostgreSQL EXCLUDE USING error: Data type integer has no default operator class

From: Ryan Kelly <rpkelly22(at)gmail(dot)com>
To: Denver Timothy <denver(at)timothy(dot)io>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL EXCLUDE USING error: Data type integer has no default operator class
Date: 2013-03-22 20:57:14
Message-ID: 20130322205714.GA27152@llserver.lakeliving.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Mar 03/22/13, 2013 at 10:14:45AM -0600, Denver Timothy wrote:
> In PostgreSQL 9.2.3 I am trying to create this simplified table:
>
> CREATE TABLE test (
> user_id INTEGER,
> startend TSTZRANGE,
> EXCLUDE USING gist (user_id WITH =, startend WITH &&)
> );
>
> But I get this error:
>
> ERROR: data type integer 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've spent quite a bit of time searching for hints on figuring out how to make this work, or figuring out why it won't work. I've also been trying to understand CREATE OPERATOR and CREATE OPERATOR CLASS, but those are over my head for now. Could anyone point me in the right direction?

CREATE EXTENSION btree_gist;

-Ryan Kelly

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2013-03-22 23:12:02 Re: DROP OWNED BY fails to drop privileges granted by non-owners (was Re: [GENERAL] Bug, Feature, or what else?)
Previous Message Misa Simic 2013-03-22 20:19:43 Re: How to join table to itself N times?