On Fri, Jun 23, 2023 at 4:23 PM Joel Jacobson <joel@compiler.org> wrote:
On Fri, Jun 23, 2023, at 08:40, jian he wrote: > I played around array_func.c > many of the code can be used for multiset data type. > now I imagine multiset as something like one dimension array. (nested > is somehow beyond the imagination...).
Are you suggesting it might be a better idea to start over completely and work on a new code base that is based on arrayfuncs.c, and aim for MULTISET/SET or anyhashset from start, that would not only support int4/int8/uuid but any type?
/Joel
select prosrc from pg_proc where proname ~* '(hash.*extended)|(extended.*hash)';
return around 30 rows.
so it's a bit generic?
I tend to think set/multiset as a one dimension array, so the textual input should be like a one dimension array.
use array_func.c functions to parse and validate the input.
So different types, one input validation function.