> > With the rule system and two underlying tables one could make it work by
> > hand I think.
>
> The rule system could be used to do this, but there was some discussion of
> using inherited tables to handle it. However neither handles the really hard
> part of detecting queries that use only a part of the table and taking that
> into account in generating the plan.
I think the consensus should be to add smarts to the planner to include
static constraint information to reduce table access.
e.g if you have a constraint "acol integer, check acol < 5"
and you have a query with a "where acol = 10" you could reduce that
to "where false". This would help in all sorts of situations not only
partitioned/inherited tables. I am not sure what the runtime cost of
such an inclusion would be, so maybe it needs smarts to only try in certain
cases ?
Andreas