Re: text type has no default operator class for GIN?

From: Bob Gobeille <bob(dot)gobeille(at)hp(dot)com>
To: "Gobeille, Robert" <bob(dot)gobeille(at)hp(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org List" <pgsql-general(at)postgresql(dot)org>
Subject: Re: text type has no default operator class for GIN?
Date: 2009-08-18 21:50:47
Message-ID: F937451D-EA55-46E7-96B8-C47091997D40@hp.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


On Aug 18, 2009, at 3:46 PM, Gobeille, Robert wrote:

> CREATE INDEX "ufile_name_search" ON "public"."uploadtree" USING GIN
> ("ufile_name");
>
> ERROR: data type text has no default operator class for access method
> "gin"
> HINT: You must specify an operator class for the index or define a
> default operator class for the data type.
>
> This is on a new 8.3 install.
> Why is this happening? Isn't creating a GIN index on a text type a
> common thing to do?
>
> I'm not seeing any mention of this in 8.3.7 docs cha 12 (Full Text
> Search).
>
> Do I really have to CREATE OPERATOR CLASS to make this work?
> I see http://www.postgresql.org/docs/8.3/interactive/sql-createopclass.html

I still don't understand the above, but the following works:

create index ufile_name_ginidx on uploadtree using
gin(to_tsvector('english', ufile_name));

Bob

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adam Rich 2009-08-18 22:42:55 Re: Postgre RAISE NOTICE and PHP
Previous Message Bob Gobeille 2009-08-18 21:46:42 text type has no default operator class for GIN?