Re: How to make operator class? - Mailing list pgsql-sql

From Tom Lane
Subject Re: How to make operator class?
Date
Msg-id 3775.981823086@sss.pgh.pa.us
Whole thread Raw
In response to How to make operator class?  ("Kim Yunhan" <spbear@hanmail.net>)
List pgsql-sql
"Kim Yunhan" <spbear@hanmail.net> writes:
> then, how to make operator class?

See the Programmer's Guide, particularly
http://www.postgresql.org/devel-corner/docs/postgres/xindex.htm

If this is a followup to your previous question about making a
reverse-order index, you'll need to start by making a support function
that delivers the reverse (negative) of what the existing btree
comparison function for the datatype does (see btint4cmp and friends).
The remaining operators to comprise the opclass are the same ones that
exist already, you just need to swap their positions (use '<' for '>'
etc).  Good luck!
        regards, tom lane


pgsql-sql by date:

Previous
From: "Albert REINER"
Date:
Subject: Re: fetching the id of a new row
Next
From: Josh Berkus
Date:
Subject: Re: How to make operator class?