Re: constraint checking on partitions - Mailing list pgsql-general

From Chris Spotts
Subject Re: constraint checking on partitions
Date
Msg-id 00bb01ca00cd$c4bb10d0$4e313270$@com
Whole thread Raw
In response to Re: constraint checking on partitions  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
>
> > If I ran a select * from A where date1 >= '2009-07-02' and date1 <
> > '2009-07-15' then I would think it wouldn't check O.
>
[Spotts, Christopher]
I oversimplified this too much - but I figured out what was happening.
If you added the June table as well and added a separate NOT constraint for
June, and then wrote the query
"SELECT * from A where date1 >= '2009-06-01' and date1 < '2009-07-05'" the
planner can't match them to individual constraints, so it doesn't exclude.
Theoretically the planner could logically "AND" them together to get better
exclusion, but it must not be.



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: constraint checking on partitions
Next
From: Tguru
Date:
Subject: Re: Trying to find a low-cost program for Data migration and ETL