Re: BUG #17818: CTE is not returning the right data. - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17818: CTE is not returning the right data.
Date
Msg-id 1905386.1677771677@sss.pgh.pa.us
Whole thread Raw
In response to BUG #17818: CTE is not returning the right data.  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.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



pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: Clause accidentally pushed down ( Possible bug in Making Vars outer-join aware)
Next
From: Tom Lane
Date:
Subject: Re: BUG #17819: The assert failed #17334 has not been repaired