Re: An incorrect check in get_memoize_path

Andrei Lepikhov <lepihov@gmail.com>

From: Andrei Lepikhov <lepihov@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-04-08T11:37:03Z
Lists: pgsql-hackers
On 4/8/25 08:32, Richard Guo wrote:
> On Mon, Apr 7, 2025 at 9:54 PM Andrei Lepikhov <lepihov@gmail.com> wrote:
>> On 4/7/25 09:50, Richard Guo wrote:
>>> Consider the join to t3.  It is a unique join, and not all of its
>>> restriction clauses are parameterized.  Despite this, the check still
>>> passes.
> 
>> At the same time I think term 'Incorrect' is not good unless you show an
>> example where data returned is not consistent to the expected.
>> I think this inequality check has worked in couple with the
>> get_equal_hashops.
> 
> Do you mean this check is designed to work in conjunction with the
> clause_sides_match_join check in paraminfo_get_equal_hashops?  I would
> consider this a very poor design.
As I have written before, I am quite happy with the change you propose. 
I just pointed out that term 'incorrect' usually means you may provide a 
query which causes an error or inconsistent data which we can add to the 
tests set. Current code may be described as 'kludge' lines - but I'm not 
a native speaker, don't bikeshed here too much.

-- 
regards, Andrei Lepikhov



Commits

  1. Fix an incorrect check in get_memoize_path