On Fri, May 30, 2003 at 11:31:23 -0700,
  Stephan Szabo <[EMAIL PROTECTED]> 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).

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?


Reply via email to