"David West" <david.west@xxxxxxxxxxxxx> writes: > I'm wondering why the postgres planner is not capable of determining the > correct partition for a simple select for the following partitioning scheme, The planner doesn't know anything about the behavior of %. Heed the fine manual's advice: Keep the partitioning constraints simple, else the planner may not be able to prove that partitions don't need to be visited. Use simple equality conditions for list partitioning, or simple range tests for range partitioning, as illustrated in the preceding examples. A good rule of thumb is that partitioning constraints should contain only comparisons of the partitioning column(s) to constants using B-tree-indexable operators. regards, tom lane