Using GIN indexes on 8.2

From: Alexander Staubo <alex(at)purefiction(dot)net>
To: PgSQL General <pgsql-general(at)postgresql(dot)org>
Subject: Using GIN indexes on 8.2
Date: 2006-11-10 14:24:58
Message-ID: 0EEBC3BD-DEEE-4924-96A0-D28093F1028E@purefiction.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Two questions about GIN on 8.2. There's not much documentation about
GIN, but this should be possible:

create table foo (values text[]);
create index foo_values_index on foo using gin (text);

However, this then fails saying the operator "@" does not exist:

select * from foo where values @ '{hello, world}'

Do I need to reference a specific opclass when creating the index?
From the documentation I got the impression that GIN bundled
operators for most built-in types.

Secondly, are GIN indexes immutable and (unlike Tsearch2) non-lossy
and therefore useful with functional indexes? I would like to do this:

create table bar (value text);
create index bar_value_index on bar using gin (analyze(value));

where analyze() is a function of my own that tokenizes, stems and
filters the text into a text[] array.

Alexander.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marcus Engene 2006-11-10 14:28:02 Re: tsearch2() with data from other table
Previous Message Alvaro Herrera 2006-11-10 14:24:29 Re: AutoVacuum on demand?