pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Kim Yunhan <spbear@hanmail.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: How to make operator class?
Date: Sat, 10 Feb 2001 11:38:06 -0500
Message-ID: <3775.981823086@sss.pgh.pa.us> (raw)
In-Reply-To: <20010210185907.HM.40000000001W64L@www5.hanmail.net>
References: <20010210185907.HM.40000000001W64L@www5.hanmail.net>

"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



view thread (3+ messages)  latest in thread

Message-ID: <3775.981823086@sss.pgh.pa.us>
Permalink:  ../3775.981823086@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/3775.981823086@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, spbear@hanmail.net
  Subject: Re: How to make operator class?
  In-Reply-To: <3775.981823086@sss.pgh.pa.us>
  References: <20010210185907.HM.40000000001W64L@www5.hanmail.net> <3775.981823086@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox