pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone.bigpanda.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruno Wolff III <bruno@wolff.to>
Cc: Achilleus Mantzios <achill@matrix.gatewaynet.com>
Cc: email lists <lists@darrenmackay.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: query not using index for descending records?
Date: Thu, 29 Jan 2004 10:27:57 -0800 (PST)
Message-ID: <20040129101857.D26621@megazone.bigpanda.com> (raw)
In-Reply-To: <24411.1075397054@sss.pgh.pa.us>
References: <20040129131847.GE17068@wolff.to>
	<Pine.LNX.4.44.0401291525350.9854-100000@matrix.gatewaynet.com>
	<20040129140655.GA14885@wolff.to>
	<20040129075643.D23153@megazone.bigpanda.com>
	<24411.1075397054@sss.pgh.pa.us>

On Thu, 29 Jan 2004, Tom Lane wrote:

> Stephan Szabo <sszabo@megazone.bigpanda.com> writes:
> > I'd thought that I'd previously sent a message containing a set of
> > definitions for the reverse opclasses (not meant for inclusion to the
> > system because I was making SQL functions that basically did -<normal
> > comparison function> to use as the function of the operator class, but
> > possibly worth playing with) but now that I actually search again, I don't
> > see it.
>
> I don't recall having seen such a thing go by...
>
> I fear that using SQL functions as comparators would only be useful for
> proof-of-concept, not as an industrial-strength implementation.  The
> index code needs comparator functions not to leak memory, and I doubt
> that that could be guaranteed with a SQL function.  You'd probably have
> speed issues too.

Yeah, that's what I figured.  I thought it might be useful for people to
play with though since at least for the integer/float types writing C
versions of the comparitors is easy. I was thinking for real it'd be nice
to be able to use the normal comparitor but invert the return value as
necessary rather than providing two functions, but I didn't look at what
that would take.



view thread (10+ messages)  latest in thread

Message-ID: <20040129101857.D26621@megazone.bigpanda.com>
Permalink:  ../20040129101857.D26621@megazone.bigpanda.com/
Also on:    postgresql.org/message-id/20040129101857.D26621@megazone.bigpanda.com

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: sszabo@megazone.bigpanda.com, tgl@sss.pgh.pa.us, bruno@wolff.to, achill@matrix.gatewaynet.com, lists@darrenmackay.com
  Subject: Re: query not using index for descending records?
  In-Reply-To: <20040129101857.D26621@megazone.bigpanda.com>

* 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