Re: Bug in row_number() optimization - Mailing list pgsql-hackers

From David Rowley
Subject Re: Bug in row_number() optimization
Date
Msg-id CAApHDvpZ=jSLt5woe1L39FhABjmoqGJyAnLfkodSSYZtBuM7KQ@mail.gmail.com
Whole thread Raw
In response to Re: Bug in row_number() optimization  (Richard Guo <guofenglinux@gmail.com>)
List pgsql-hackers
On Thu, 1 Dec 2022 at 21:18, Richard Guo <guofenglinux@gmail.com> wrote:
>> +   if (!func_strict(opexpr->opfuncid))
>> +       return false;
>>
>> Should return true instead?
>
>
> Yeah, you're right.  This should be a thinko.

Yeah, oops. That's wrong.

I've adjusted that in the attached.

I'm keen to move along and push the fix for this bug.  If there are no
objections to the method in the attached and also adding the
restriction to limit the optimization to only working with strict
OpExprs, then I'm going to push this, likely about 24 hours from now.

David

Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Optimize common expressions in projection evaluation
Next
From: Tom Lane
Date:
Subject: Re: Optimize common expressions in projection evaluation