Re: POC: converting Lists into arrays

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: POC: converting Lists into arrays
Дата
Msg-id 2420.1563246458@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: POC: converting Lists into arrays  (David Rowley <david.rowley@2ndquadrant.com>)
Ответы Re: POC: converting Lists into arrays  (David Steele <david@pgmasters.net>)
Список pgsql-hackers
David Rowley <david.rowley@2ndquadrant.com> writes:
> The only thoughts I have so far here are that it's a shame that the
> function got called list_qsort() and not just list_sort().  I don't
> see why callers need to know anything about the sort algorithm that's
> being used.

Meh.  list_qsort() is quicksort only to the extent that qsort()
is quicksort, which in our current implementation is a bit of a
lie already --- and, I believe, it's much more of a lie in some
versions of libc.  I don't really think of either name as promising
anything about the underlying sort algorithm.  What they do share
is an API based on a callback comparison function, and if you are
looking for uses of those, it's a lot easier to grep for "qsort"
than some more-generic term.

            regards, tom lane



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

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: POC: converting Lists into arrays
Следующее
От: David Steele
Дата:
Сообщение: Re: POC: converting Lists into arrays