Re: Do we want a hashset type?
| От | Joel Jacobson | 
|---|---|
| Тема | Re: Do we want a hashset type? | 
| Дата | |
| Msg-id | 2dd3bdf9-f943-4e50-806a-e0df7cf5ddb8@app.fastmail.com обсуждение исходный текст | 
| Ответ на | Re: Do we want a hashset type? (Tomas Vondra <tomas.vondra@enterprisedb.com>) | 
| Ответы | Re: Do we want a hashset type? Re: Do we want a hashset type? | 
| Список | pgsql-hackers | 
On Wed, Jun 14, 2023, at 15:16, Tomas Vondra wrote:
> On 6/14/23 14:57, Joel Jacobson wrote:
>> Would it be feasible to teach the planner to utilize the internal hash table of
>> hashset directly? In the case of arrays, the hash table construction is an
...
> It's definitely something I'd leave out of v0, personally.
OK, thanks for guidance, I'll stay away from it.
I've been doing some preparatory work on this todo item:
> 3) support for other types (now it only works with int32)
I've renamed the type from "hashset" to "int4hashset",
and the SQL-functions are now prefixed with "int4"
when necessary. The overloaded functions with
int4hashset as input parameters don't need to be prefixed,
e.g. hashset_add(int4hashset, int).
Other changes since last update (4e60615):
* Support creation of empty hashset using '{}'::hashset
* Introduced a new function hashset_capacity() to return the current capacity
  of a hashset.
* Refactored hashset initialization:
  - Replaced hashset_init(int) with int4hashset() to initialize an empty hashset
    with zero capacity.
  - Added int4hashset_with_capacity(int) to initialize a hashset with
    a specified capacity.
* Improved README.md and testing
As a next step, I'm planning on adding int8 support.
Looks and sounds good?
/Joel
		
	Вложения
В списке pgsql-hackers по дате отправления: