On 2016-09-01 21:36:13 +0200, Tomas Vondra wrote: > Of course, it's harmless as none of those CTEs gets actually executed, > but is this intentional, or do we want/need to fix it? I don't see > anything about this in the docs, but it seems a bit awkward and > confusing to remove only some of the CTEs - I think we should either > remove all or none of them. > > I don't think that should be particularly difficult - ISTM we need to > make SS_process_ctes a bit smarter, essentially by adding a loop to > remove the CTEs recursively (and decrease the refcount).
I don't really see a lot of benefit in expanding energy on this. Skipping the CTE in the easy case saves som eplan cycles. Making more effort to remove CTEs recursively probably doesn't... Greetings, Andres Freund -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers