Re: Do we want a hashset type? - Mailing list pgsql-hackers

From jian he
Subject Re: Do we want a hashset type?
Date
Msg-id CACJufxEbxYa4PP6yFmyx36p_sfPrLJtbYN+avmbH9oatUxWOrA@mail.gmail.com
Whole thread Raw
In response to Re: Do we want a hashset type?  ("Joel Jacobson" <joel@compiler.org>)
List pgsql-hackers


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. 

Does this make sense?

pgsql-hackers by date:

Previous
From: torikoshia
Date:
Subject: Re: Allow pg_archivecleanup to remove backup history files
Next
From: Masahiro Ikeda
Date:
Subject: Re: Support to define custom wait events for extensions