Exclusion constraints with time expressions

Поиск
Список
Период
Сортировка
От Thomas Munro
Тема Exclusion constraints with time expressions
Дата
Msg-id CADLWmXUn8V=+j2f=km9d5Rtscu9hQLgv36BFBfPtVdCZXkuJ=A@mail.gmail.com
обсуждение исходный текст
Ответы Re: Exclusion constraints with time expressions  ("Albe Laurenz" <laurenz.albe@wien.gv.at>)
Список pgsql-general
Hi

I am using 9.1.6, and I've set up a partitioned table as described in the manual, with partitions based on a timestamptz column called 'time'.  The exclusion constraints work nicely when I select ranges of times with literal constants.  But why would a WHERE clause like the following not benefit from exclusion constraints?

  time > TIMESTAMPTZ '2012-11-03 00:00:00Z' + INTERVAL '24 hours'

Isn't that expression on the right reducible to a constant up front?  Obviously I can use a host language to do the arithmetic and provide a constant, but I am curious to understand why that wouldn't be constant-folded.

Thanks
Thomas

В списке pgsql-general по дате отправления:

Предыдущее
От: Denis Gasparin
Дата:
Сообщение: Question about data corruption issue of 9.1 (pre 9.1.6)
Следующее
От: Tianyin Xu
Дата:
Сообщение: Does PostgreSQL have complete functional test cases?