Re: check constraint question
| От | Gregory Stark |
|---|---|
| Тема | Re: check constraint question |
| Дата | |
| Msg-id | 877ihyjfyb.fsf@oxford.xeocode.com обсуждение исходный текст |
| Ответ на | Re: check constraint question ("Tim Rupp" <caphrim007@gmail.com>) |
| Список | pgsql-general |
"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!
В списке pgsql-general по дате отправления: