User-defined types and indices - Mailing list pgsql-general

From Adriaan Joubert
Subject User-defined types and indices
Date
Msg-id 375E8C9B.CD54C885@albourne.com
Whole thread Raw
List pgsql-general
Hi,

    I defined a new type, and it is essential that I am able to use it in
an index. This seems to require a bit more than just having the
comparison operators. On the create index page it seems that it is
necessary to define an *_ops class for the new type, but I have no idea
how I go about this. I have looked at the folowing system tables

pg_am
pg_amop
pg_opclass
pg_operator

but have no idea how I go about inserting the new type into these
classes.

I have operators for <, <=, =, <>, > and >= defined and they work fine,
so I think it should be possible to define a btree. I did not define
HASH or any of that stuff when defining the operators as I wasn't too
sure what that implied.

I'd really appreciate any hints on this one.


Thanks in advance,

Adriaan

pgsql-general by date:

Previous
From: Herouth Maoz
Date:
Subject: Re: [GENERAL] Howto convert arrays 2 query results
Next
From: Adriaan Joubert
Date:
Subject: Re: [GENERAL] User-defined types and indices