On Thu, Dec 29, 2005 at 04:33:32PM -0000, Andrew - Supernews wrote:
> On 2005-12-29, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> > Well, no, that's not the problem: the problem is that you should be able
> > to specify ORDER BY any sort ordering that the system can deal with, and
> > the USING syntax is in fact too impoverished to do that. What if the
> > mentioned operator is in more than one operator class? I believe that
> > ATM the code makes a random choice of which opclass' sort function to
> > use, which pretty much sucks.
> Does it matter? How would the same operator specify different orderings
> in different operator classes, given that it must be a strict weak ordering
> for sorting to even work, and such an ordering is completely determined by
> either one of its greater-than/less-than operators?
Well, we currently don't forbid it and indeed encourage it (by
encouraging reverse operator classes) as the only way to handle the
ORDER a, b DESC case right now.
I don't think I can find any other examples right now. I don't think
I'd have a problem with forbidding it at some future date.
Have a nice day,
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.
In response to
pgsql-hackers by date
|Next:||From: Magnus Hagander||Date: 2006-01-01 11:49:40|
|Subject: psql & readline & win32|
|Previous:||From: Martijn van Oosterhout||Date: 2006-01-01 11:01:42|
|Subject: Re: Removing SORTFUNC_LT/REVLT|