Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries - Mailing list pgsql-bugs

From Alexander Korotkov
Subject Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries
Date
Msg-id CAPpHfdt1oJ7UQ2kQRc+Z=hfj1VV67iFDtHrP_ozmsgT-yQwRbA@mail.gmail.com
Whole thread Raw
In response to Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries  (Richard Guo <guofenglinux@gmail.com>)
Responses Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries  (Alexander Korotkov <aekorotkov@gmail.com>)
List pgsql-bugs
On Mon, Jan 8, 2024, 13:51 Richard Guo <guofenglinux@gmail.com> wrote:

On Fri, Jan 5, 2024 at 11:32 AM Andrei Lepikhov <a.lepikhov@postgrespro.ru> wrote:
The regression test shows where two fully equal join clauses, applied on
different join levels, differ by the only required_relids. It covers the
problem and can be helpful by itself. IMO, one line in this test is
redundant (see attachment).

Hmm, I don't think the insert statement in the test case is redundant.
It's needed to verify that the query in the test case gives the correct
result.  Without the insert statement, the wrong plan would give the
same result as the correct plan, i.e., an empty set in this case.

IMO, if we make some code changes and add a test case for that, we need
to ensure the test can give a different (and correct of course) result
than what came before.

Thank you for pointing this.  Yes, veryfying query result not just plan is strengthening the test.  I'll recheck this and push the fix later today.

------
Regards,
Alexander Korotkov

pgsql-bugs by date:

Previous
From: Devrim Gündüz
Date:
Subject: Re: centos7 setup - repomd.xml signature could not be verified for pgdg-common
Next
From: Alexander Korotkov
Date:
Subject: Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries