Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f1AGcIx64867 for ; Sat, 10 Feb 2001 11:38:18 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f1AGc6903778; Sat, 10 Feb 2001 11:38:06 -0500 (EST) To: "Kim Yunhan" cc: pgsql-sql@postgresql.org Subject: Re: How to make operator class? In-reply-to: <20010210185907.HM.40000000001W64L@www5.hanmail.net> References: <20010210185907.HM.40000000001W64L@www5.hanmail.net> Comments: In-reply-to "Kim Yunhan" message dated "Sat, 10 Feb 2001 18:59:07 +0700" Date: Sat, 10 Feb 2001 11:38:06 -0500 Message-ID: <3775.981823086@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200102/193 X-Sequence-Number: 1380 "Kim Yunhan" 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