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

From: Alena Rybakina <a(dot)rybakina(at)postgrespro(dot)ru>
To: Alexander Lakhin <exclusion(at)gmail(dot)com>, Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Andrei Lepikhov <lepihov(at)gmail(dot)com>
Cc: jian he <jian(dot)universality(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Nikolay Shaplov <dhyan(at)nataraj(dot)su>, pgsql-hackers(at)lists(dot)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie>, Marcos Pegoraro <marcos(at)f10(dot)com(dot)br>, teodor(at)sigaev(dot)ru, Peter Eisentraut <peter(at)eisentraut(dot)org>, Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
Subject: Re: POC, WIP: OR-clause support for indexes
Date: 2024-11-28 19:08:51
Message-ID: 1765b44d-55e0-4ad2-a5f5-5492acf826b0@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Sorry, I was in a hurry and forgot to add the test result. I updated the
patch

On 28.11.2024 22:03, Alena Rybakina wrote:
> Hi! Thank you for the case.
>
> On 28.11.2024 21:00, Alexander Lakhin wrote:
>> Hello Alexander,
>>
>> 21.11.2024 09:34, Alexander Korotkov wrote:
>>> I'm going to push this if no objections.
>>
>> Please look at the following query, which triggers an error after
>> ae4569161:
>> SET random_page_cost = 1;
>> CREATE TABLE tbl(u UUID);
>> CREATE INDEX idx ON tbl USING HASH (u);
>> SELECT COUNT(*) FROM tbl WHERE u = '00000000000000000000000000000000' OR
>>   u = '11111111111111111111111111111111';
>>
>> ERROR:  XX000: ScalarArrayOpExpr index qual found where not allowed
>> LOCATION:  ExecIndexBuildScanKeys, nodeIndexscan.c:1625
>>
>>
> I found out what the problem is index scan method was not generated.
> We need to check this during OR clauses for SAOP transformation.
>
> There is a patch to fix this problem.
>
--
Regards,
Alena Rybakina
Postgres Professional

Attachment Content-Type Size
bugfix.diff text/x-patch 2.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Daniel Gustafsson 2024-11-28 19:18:22 Re: More CppAsString2() in psql's describe.c
Previous Message Alena Rybakina 2024-11-28 19:03:36 Re: POC, WIP: OR-clause support for indexes