Re: Is tuplesort_heap_siftup() a misnomer?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is tuplesort_heap_siftup() a misnomer?
Дата
Msg-id 747.1473284546@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Is tuplesort_heap_siftup() a misnomer?  (Peter Geoghegan <pg@heroku.com>)
Ответы Re: Is tuplesort_heap_siftup() a misnomer?  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
Peter Geoghegan <pg@heroku.com> writes:
> On Fri, Aug 12, 2016 at 4:30 PM, Peter Geoghegan <pg@heroku.com> wrote:
>> Doesn't tuplesort_heap_siftup() actually shift-down?

The reason it's called siftup is that that's what Knuth calls it.
See Algorithm 5.2.3H (Heapsort), pp 146-147 in the first edition of
Volume 3; tuplesort_heap_siftup corresponds directly to steps H3-H8.

> Heikki (CC'd) and I discussed this privately today, and we were in
> agreement that this needs to be fixed, so I wrote a patch, which I
> attach here.

I think this patch is misguided, as it unnecessarily moves the code
away from standard nomenclature.
        regards, tom lane



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

Предыдущее
От: Gavin Flower
Дата:
Сообщение: Re: Long options for pg_ctl waiting
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: (Comment)Bug in CteScanNext