Skip site navigation (1) Skip section navigation (2)

Re: Removing SORTFUNC_LT/REVLT

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: andrew(at)supernews(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Removing SORTFUNC_LT/REVLT
Date: 2006-01-01 11:12:24
Message-ID: 20060101111117.GB1182@svana.org (view raw or flat)
Thread:
Lists: pgsql-hackers
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

Responses

pgsql-hackers by date

Next:From: Magnus HaganderDate: 2006-01-01 11:49:40
Subject: psql & readline & win32
Previous:From: Martijn van OosterhoutDate: 2006-01-01 11:01:42
Subject: Re: Removing SORTFUNC_LT/REVLT

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group