> Looking at the patch, it still seems solid, but I remember that one
> thing I was concerned about was whether the more generalized code
> was any slower. Not sure about a good test case to measure that
> though --- const-simplification isn't a large chunk of most workloads.
This patch no longer applies cleanly on HEAD, so here's a rebased version
(no substantive changes). As before, I think the most useful review task
would be to quantify whether it makes planning noticeably slower.
regards, tom lane