Re: index suggestion for 7.4 - Mailing list pgsql-hackers

From Bruno Wolff III
Subject Re: index suggestion for 7.4
Date
Msg-id 20030530190317.GA24222@wolff.to
Whole thread Raw
In response to Re: index suggestion for 7.4  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: index suggestion for 7.4
List pgsql-hackers
On Fri, May 30, 2003 at 11:31:23 -0700, Stephan Szabo <sszabo@megazone23.bigpanda.com> wrote:
> On Fri, 30 May 2003, Bruno Wolff III wrote:
> 
> > I was hoping the new stuff Tom added would make doing this easier. The issue
> > has come up before and at least at that time it didn't get changed so I
> > expected it wasn't easy to do.
> >
> > I thought maybe there was information for the - operator
> > that would allow you to know that you could use an index on -col
> > to go in the reverse direction safely.
> 
> Not really.  I think that if you were to do that, you'd probably need to
> provide an additional thing to the opclass to let it know.  Otherwise it'd
> be unsafe for user defined types/user defined - operators and doesn't help
> on things where - isn't the correct way to do it.

I went back and reread the stuff on NEGATOR and found it only applies
to operators that return boolean types. I had thought it was different
and would let you make the deduction a > b <=> -a <= -b, but that isn't
the case. Instead it lets you make the deduction that a > b <=> NOT (a <= b).


pgsql-hackers by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: index suggestion for 7.4
Next
From: Peter Eisentraut
Date:
Subject: Re: Practical sets of SQLSTATE values?