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: > > ('Foo',1) > ('foo',2) > ('Foo',3) > > would produce the wrong output, no?
Yeah, I was thinking about that but I'm not sure how big a problem it is. 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@svana.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.
pgpoA71wMSYFC.pgp
Description: PGP signature