Haribabu Kommi <kommi.harib...@gmail.com> writes: > I checked the latest patch and it is working fine and I don't have any > further comments. Marked the patch as "ready for committer".
I started to look at this patch, and I'm not entirely convinced whether it is a good thing for the planner_hook to bump nested_level. ISTM that will change behavior in some ways, in particular when the planner chooses to evaluate an immutable or stable function that runs the executor (probably via SPI). Before, that execution would have been regarded as a top-level call, now it will not be. Maybe that's fine, but did anyone think hard about it? A possible alternative behavior is for planner_hook to maintain its own nesting depth counter, separate from the one for execution nesting depth. I'm not sure if that's better or not. Discuss ... regards, tom lane