Hi,
I'm submitting patch v2.2.
This version fixed an issue that involves CTE. Because we call subquery_planner before deciding whether to proceed with
thetransformation, we need to setup access to upper level CTEs at this point if the subquery contains any CTE
RangeTblEntry.
Also added more test cases of NOT IN accessing CTEs, including recursive CTE. It's nice that CTE can use index now!
Let me know if you have any comments.
Regards,
-----------
Zheng Li
AWS, Amazon Aurora PostgreSQL