From: | Bruno Wolff III <bruno(at)wolff(dot)to> |
---|---|
To: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: index suggestion for 7.4 |
Date: | 2003-05-30 19:03:17 |
Message-ID: | 20030530190317.GA24222@wolff.to |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, May 30, 2003 at 11:31:23 -0700,
Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)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).
From | Date | Subject | |
---|---|---|---|
Next Message | greg | 2003-05-30 19:06:38 | Re: XML ouput for psql |
Previous Message | greg | 2003-05-30 18:37:06 | Re: fomatting an interval (resend) |