Michael Fuhr <mike@fuhr.org> writes:
> Running EXPLAIN on a view that has an aggregate and uses an index
> results in the error "bogus varno: 5".
I've committed a fix for this --- it was a bug in the recently added
code that eliminates useless SubqueryScan nodes.
regards, tom lane