Default operator class for data type boolean for access method gist is missing

From: Andreas Joseph Krogh <andreak(at)officenet(dot)no>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Default operator class for data type boolean for access method gist is missing
Date: 2014-03-23 00:20:28
Message-ID: OfficeNetEmail.28c.ee96b3861c666d18.144ec49f396@prod2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to define the following exclusion-constraint   alter table my_table
add EXCLUDE USING gist(is_default WITH =, daterange(valid_from, valid_to, '[)')
WITH&&) WHERE (is_default = true);   But it fails with: ERROR:  data type
boolean 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 have the btree_gist extension installed.  
So, my question is; Is there an existing operator-class I can install to make
this work, and if not - how do I make it?   I know I can change is_default to
INTEGER and use 1 and 0, but I'd really like to use boolean for this.   Thanks.
  --
Andreas Joseph Krogh <andreak(at)officenet(dot)no>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Emre Hasegeli 2014-03-23 07:13:43 Re: Default operator class for data type boolean for access method gist is missing
Previous Message James Harper 2014-03-22 23:54:45 Re: spi in bgworker