On Sun, Jan 01, 2006 at 07:48:56AM -0000, Andrew - Supernews wrote:
> Doesn't this result in incorrect output in multi-column sorts?
> i.e. if 'Foo' = 'foo', but for sorting purposes you always sort them
> with 'Foo' first, then a multicolumn sort of the following data:
> would produce the wrong output, no?
Yeah, I was thinking about that but I'm not sure how big a problem it
We could make this work by having the sorting routines (and by
extension the lookups for indexes) by doing two passes: one with the
comparison routines and use the actual sorting routines only on
tie-breaks. A kind of big mark against the idea. Although this is
exactly the kind of work required for string sorting in many locales...
Whatever we do, the result of ORDER BY has to match index order. Does
this mean scankeys need to have two functions, in case of tie-breaking
multi-column keys. I dunno but it needs thinking about.
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: Martijn van Oosterhout||Date: 2006-01-01 11:12:24|
|Subject: Re: Removing SORTFUNC_LT/REVLT|
|Previous:||From: Qingqing Zhou||Date: 2006-01-01 07:52:48|
|Subject: Re: EINTR error in SunOS|