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

From Tom Dunstan
Subject Re: Do we want a hashset type?
Date
Msg-id CAPPfruySQDMaV41Tj8yBFGF6L0cd2Brr8L1eZPbosR=HKX5ysw@mail.gmail.com
Whole thread Raw
In response to Re: Do we want a hashset type?  (Tomas Vondra <tomas.vondra@enterprisedb.com>)
List pgsql-hackers
On Wed, 14 Jun 2023 at 19:14, Tomas Vondra <tomas.vondra@enterprisedb.com> wrote:
> ...So we'd want the same index usage as
> =ANY(array) but would like faster row checking than we get with an array
> when other indexes are used.

We kinda already do this since PG14 (commit 50e17ad281), actually. If
the list is long enough (9 values or more), we'll build a hash table
during query execution. So pretty much exactly what you're asking for.

Ha! That is great. Unfortunately we can't rely on it as we have customers using versions back to 12. But good to know that it's available when we bump the required versions.

Thanks

Tom

pgsql-hackers by date:

Previous
From: Thomas Munro
Date:
Subject: Re: Inconsistent results with libc sorting on Windows
Next
From: "Tristan Partin"
Date:
Subject: Re: [PATCH] Missing dep on Catalog.pm in meson rules