Re: Removing SORTFUNC_LT/REVLT

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: Removing SORTFUNC_LT/REVLT
Дата
Msg-id 20060101111117.GB1182@svana.org
обсуждение исходный текст
Ответ на Re: Removing SORTFUNC_LT/REVLT  (Andrew - Supernews <andrew+nonews@supernews.com>)
Ответы Re: Removing SORTFUNC_LT/REVLT  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Thu, Dec 29, 2005 at 04:33:32PM -0000, Andrew - Supernews wrote:
> On 2005-12-29, Tom Lane <tgl@sss.pgh.pa.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@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.

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Removing SORTFUNC_LT/REVLT
Следующее
От: "Magnus Hagander"
Дата:
Сообщение: psql & readline & win32