"Tim Rupp" <caphrim007@gmail.com> writes:
> where start_time >= '2008-01-01'::date AND start_time < '2008-01-10'::date
>
> should give the same rows as
>
> where start_time >= '2008-01-01'::date AND end_time <= '2008-01-09'::date
I think you'll need to do the same thing to the constraints as well. You'll
probably want four clauses on your constraints:
start_time >= ... and start_time <= ... and end_time >= ... and end_time <= ...
(or BETWEEN which is equivalent)
Then you could include start_time and/or end_time ranges in your where clause
and the planner would prune partitions using both ranges.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Get trained by Bruce Momjian - ask me about EnterpriseDB's PostgreSQL training!