Re: qsort again (was Re: [PERFORM] Strange Create Index

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: qsort again (was Re: [PERFORM] Strange Create Index
Дата
Msg-id 11801.1140205386@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: qsort again (was Re: [PERFORM] Strange Create Index  (Mark Lewis <mark.lewis@mir3.com>)
Список pgsql-hackers
Mark Lewis <mark.lewis@mir3.com> writes:
> I think we're actually on the same page here; you're right that the
> constraint above ( f(a)==f(b) iff a==b ) can't be extended to data types
> with more than 32 bits of value space.  But the constraint I listed was
> actually:

> if a==b then f(a)==f(b)

I believe Martijn had it right: the important constraint is

    f(a) > f(b) implies a > b

which implies by commutativity

    f(a) < f(b) implies a < b

and these two together imply

    a == b implies f(a) == f(b)

Now you can't do any sorting if you only have the equality rule, you
need the inequality rule.

            regards, tom lane

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

Предыдущее
От: Christian Bird
Дата:
Сообщение: who is pgsql in cvs
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: who is pgsql in cvs