User-defined types and indices
User-defined types and indices
От:
Adriaan Joubert <a.joubert@albourne.com>
Дата:
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
Re: [GENERAL] User-defined types and indices
От:
Adriaan Joubert <a.joubert@albourne.com>
Дата:
> > 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 > Aaah, grepping through the sgml doc stuff I finally found something that looks as if it explains what I want! Sorry for the bandwith. Adriaan