Search Postgresql Archives

Exclusion constraints with time expressions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux