Re: Do we want a hashset type?

Поиск
Список
Период
Сортировка
От jian he
Тема Re: Do we want a hashset type?
Дата
Msg-id CACJufxFMHZXdZtgt621QdO=h9fz778nAahgMvSMxepSCwp8aqQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Do we want a hashset type?  ("Joel Jacobson" <joel@compiler.org>)
Ответы Re: Do we want a hashset type?  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
Список pgsql-hackers
> Or maybe I just don't understand the proposal. Perhaps it'd be best if
> jian wrote a patch illustrating the idea, and showing how it performs
> compared to the current approach.

currently joel's idea is a int4hashset. based on the code first tomas wrote.
it looks like a non-nested an collection of unique int4. external text format looks like {int4, int4,int4}
structure looks like (header +  capacity slots * int4).
Within the capacity slots, some slots are empty, some have unique values.

The textual int4hashset looks like a one dimensional array.
so I copied/imitated src/backend/utils/adt/arrayfuncs.c code, rewrote a slight generic hashset input and output function.

see the attached c file.
It works fine for non-null input output for {int4hashset, int8hashset, timestamphashset,intervalhashset,uuidhashset).
Вложения

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

Предыдущее
От: Ranier Vilela
Дата:
Сообщение: Speeding Up Bitmapset
Следующее
От: Ahmed Ibrahim
Дата:
Сообщение: Re: Inquiry/Help with pg_adviser (problem in index_create function for creating indexes)