Gregory Stark <stark@enterprisedb.com> writes:
> This is something that needs some serious thought though. In the case of
> partitioned tables I've seen someone get badly messed up plans because they
> had a couple hundred partitions each of which estimated to return 1 row. In
> fact of course they all returned 0 rows except the correct partition. (This
> was in a join so no constraint exclusion)
Yeah, one of the things we need to have a "serious" partitioning
solution is to get the planner's estimation code to understand
what's happening there.
regards, tom lane