gist problem

From: Grzegorz Piotr Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
To: pgsql-hackers(at)postgresql(dot)org
Subject: gist problem
Date: 2005-10-26 18:02:29
Message-ID: 200510262002.29987@gj-laptop
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi list

I got memleak fixed, valgrind doesn't quite find problems there, I had to dig
it manually.

Anyway, to the point.
Now that I've created gist index, I want to use it on table, here it goes:

CREATE OPERATOR CLASS gist_enum2916_operators
DEFAULT FOR TYPE enum2916 USING gist
AS
OPERATOR 1 >>= ,
OPERATOR 2 <<= ,
OPERATOR 3 >> ,
OPERATOR 4 << ,
OPERATOR 5 && ,
OPERATOR 6 = ,

FUNCTION 1 enum_consistent (internal, enum2916, enum2916),
FUNCTION 2 enum_union (internal, internal),
FUNCTION 3 enum_compress (internal),
FUNCTION 4 enum_decompress (internal),
FUNCTION 5 enum_penalty (internal, internal, internal),
FUNCTION 6 enum_picksplit (internal, internal),
FUNCTION 7 enum_same (enum2916, enum2916, internal);

than I create table and apply index to it.
At this point enable_seqscan is off.

CREATE TABLE dupa (
a integer,
b enum2916
);

--- we can now create gist index, let's do it :P
CREATE INDEX blah ON dupa USING gist (b);

I am unable to use ~ or @ operators, I thought gist would supply them for me,
am I right ?

even through seqscan is off, on
explain analyze select * from dupa where b <> 'something';
I get:
QUERY PLAN
----------------------------------------------------------------------------------------------------
Seq Scan on dupa (cost=0.00..24.50 rows=580 width=36) (actual
time=2.344..29.432 rows=12 loops=1)
Filter: (b <> '%.4.0.6.1.e164.digifonica.com'::enum2916)
Total runtime: 29.936 ms
(3 rows)

Can someone shed a bit of light on this for me please.
This is postgres 8.1b4, basicaly cvs head.

Thanks.

--
GJ

Binary system, you're either 1 or 0...
dead or alive ;)

Browse pgsql-hackers by date

  From Date Subject
Next Message David Fetter 2005-10-26 18:16:01 Re: add_missing_from breaks existing views
Previous Message Josh Berkus 2005-10-26 17:59:40 Re: add_missing_from breaks existing views