Re: POC, WIP: OR-clause support for indexes - Mailing list pgsql-hackers

From Andrei Lepikhov
Subject Re: POC, WIP: OR-clause support for indexes
Date
Msg-id aeaa12f2-830c-4606-ab46-215911498580@gmail.com
Whole thread Raw
In response to Re: POC, WIP: OR-clause support for indexes  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-hackers
On 11/25/24 14:08, Alexander Korotkov wrote:
> Hi, Richard!
> 
> On Mon, Nov 25, 2024 at 8:28 AM Richard Guo <guofenglinux@gmail.com> wrote:
>> On Thu, Nov 21, 2024 at 3:34 PM Alexander Korotkov <aekorotkov@gmail.com> wrote:
>>> I'm going to push this if no objections.
>>
>> Here is an Assert failure in match_orclause_to_indexcol.
>>
>> create table t (a int);
>> create index on t (a);
>>
>> # explain select * from t where a <= 0 or a <= 1;
>> server closed the connection unexpectedly
>>
>> The assertion is that the collected Const values cannot be NULL and
>> cannot be zero.  The latter part about zero values doesn't make sense
>> to me.  Why can't the values be zero?
I guess, this code came from the first raw prototypes designed with the 
erroneous assumption that they would check a NULL pointer.
Anyway, thanks for looking into it!

>>
>>      Assert(!value->constisnull && value->constvalue);
> 
> Yes, this is a dumb assertion.  Removed.
Thank you!

-- 
regards, Andrei Lepikhov



pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: per backend I/O statistics
Next
From: Maxim Orlov
Date:
Subject: Re: Forbid to DROP temp tables of other sessions