Re: POC, WIP: OR-clause support for indexes

From: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru>, pgsql-hackers(at)postgresql(dot)org
Cc: Peter Geoghegan <pg(at)bowt(dot)ie>, Robert Haas <robertmhaas(at)gmail(dot)com>, "Finnerty, Jim" <jfinnert(at)amazon(dot)com>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, teodor(at)sigaev(dot)ru, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Subject: Re: POC, WIP: OR-clause support for indexes
Date: 2023-11-20 08:52:08
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On 10/11/2023 16:20, Alena Rybakina wrote:
>> I added log like that: ERROR:  unrecognized node type: 0.
> I fixed this issue and added some cosmetic refactoring.
> The changes are presented in the or_patch_changes.diff file.

Looking into the patch, I found some trivial improvements (see attachment).
Also, it is not obvious that using a string representation of the clause
as a hash table key is needed here. Also, by making a copy of the node
in the get_key_nconst_node(), you replace the location field, but in the
case of complex expression, you don't do the same with other nodes.
I propose to generate expression hash instead + prove the equality of
two expressions by calling equal().

Andrei Lepikhov
Postgres Professional

Attachment Content-Type Size
changes.txt text/plain 1.1 KB

In response to


Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2023-11-20 09:05:43 Re: Question about the Implementation of vector32_is_highbit_set on ARM
Previous Message Dilip Kumar 2023-11-20 08:51:47 Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock