> 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).