updated list rewrite

Поиск
Список
Период
Сортировка
От Neil Conway
Тема updated list rewrite
Дата
Msg-id 40B1D4E2.7030603@samurai.com
обсуждение исходный текст
Ответы Re: updated list rewrite  (Gaetano Mendola <mendola@bigfoot.com>)
Список pgsql-patches
I've attached a new version of the list rewrite patch (gzip'ed). Changes
since the last patch:

- incorporate two bugfixes from Tom: off-by-one in list_nth() and
replace another lfirst() in optimizer/plan/createplan.c with
lfirst(list_head())

- reimplement list_difference() and list_union(); rather than trying to
provide one function that works for all kinds of lists, give up on
trying to reuse code and provide datatype specific functions. This means
we don't need list_append_auto() and list_member_auto(). Along the way,
fix a bug in list_difference() pointed out by Tom.

- replace list_head(), list_tail() and list_length() macros with GCC
inline functions, when possible (otherwise, we fall back to out-of-line
functions). This avoids doubly-evaluating the macro arguments, but it
will likely result in a performance hit for non-GCC compilers. Since
inline functions are specified by C99, we shouldn't assume that CC !=
gcc implies inline functions aren't available, but I'll revisit this later.

- add linitial(), linitial_int(), and linitial_oid(). I haven't actually
changed the tree to use these macros yet, though.

- add a new #define LIST_CELL_TYPE in pg_list.h to reduce the number of
list compatibility #ifdefs

-Neil


Вложения

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

Предыдущее
От: Manfred Koizar
Дата:
Сообщение: Re: Tuple sampling
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Tuple sampling