Stephen Frost <sfrost(at)snowman(dot)net> writes:
> Interesting. I'm trying to reason out why we don't have it already in
> similar situations; we can't *always* flatten a subquery...
I think we do, just nobody's particularly noticed (which further reduces
the urgency of finding a solution, I suppose).
regards, tom lane