Re: BUG #17818: CTE is not returning the right data.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: cute_hoay88(at)hotmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #17818: CTE is not returning the right data.
Date: 2023-03-02 15:41:17
Message-ID: 1905386.1677771677@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)org> writes:
> PostgreSQL version: 12.1

> Scenario: When i execute this above query, i am not able to find the feature
> AA and Item AA EXT Inner-Lane- 1.1G.
> But weird is i tried out with this (below example: Add WHERE inside the
> cte), then i am able to get the item:

I agree that's strange, but ...

> Can you please help to investigate and explain what is the possible root
> cause for this?

Nobody is going to be able to help you from that amount of information.
I would suggest, if you really are running 12.1, that your first step
should be to update to 12.latest (currently 12.14), as you are missing
more than three years worth of bug fixes. Another useful step could be
to re-index these tables, just in case the problem is index corruption.
(Do that *after* updating.)

If you still see strange behavior, and can provide a self-contained test
case, we'd be happy to look at it.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2023-03-02 16:09:00 Re: BUG #17819: The assert failed #17334 has not been repaired
Previous Message Tom Lane 2023-03-02 15:27:18 Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)