Hari Warrier <> writes:
> A query on foobar2 (child table) uses the index, whereas the same query
> via foobar (parent) doesn't.
A query just on foobar should be able to use the index AFAIR. The
problem here is that you have a join, and we are not very good about
situations involving joins against inheritance sets (nor joins against
UNION ALL subqueries, which is really about the same thing).
I'm hoping to get a chance to look into improving this during the 8.2
regards, tom lane