Workaround for bad statistics on partitioned tables in PostgreSQL
fixed #259