Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries

From: Andrei Lepikhov <a(dot)lepikhov(at)postgrespro(dot)ru>
To: Richard Guo <guofenglinux(at)gmail(dot)com>
Cc: Alexander Korotkov <aekorotkov(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, zuming(dot)jiang(at)inf(dot)ethz(dot)ch, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #18261: Inconsistent results of SELECT affected by joined subqueries
Date: 2024-01-09 00:27:45
Message-ID: 8fe2d19a-9c96-459d-871d-e8ec780e8927@postgrespro.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On 8/1/2024 18:50, Richard Guo wrote:
>
> On Fri, Jan 5, 2024 at 11:32 AM Andrei Lepikhov
> <a(dot)lepikhov(at)postgrespro(dot)ru <mailto:a(dot)lepikhov(at)postgrespro(dot)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.
Maybe. I personally support explain by an execution result if the code
is related to executor and couldn't be detected by the form of query
plan. But why not? anyway, Alexander already committed that.

--
regards,
Andrei Lepikhov
Postgres Professional

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Nathan Bossart 2024-01-09 03:47:22 Re: Wrong datatype in docs for wal_summary_keep_time
Previous Message Nathan Bossart 2024-01-08 23:23:11 Re: Wrong datatype in docs for wal_summary_keep_time