Search Postgresql Archives

Re: Constraint exclusion for timestamp expression

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

 



2014-05-20 14:26 GMT+03:00 Tom Lane <tgl@xxxxxxxxxxxxx>:
Victor Yegorov <vyegorov@xxxxxxxxx> writes:
> How can I enforce pruning to kick in for the initial expressions?

You already found out: use constants.  The planner can't remove
partitions on the basis of clauses involving volatile, or even
stable, functions, because their results might be different at
runtime.

Do you mean constants are the only way here?
I.e. there is absolutely no way to use any of the "current date / timestamp" functions available?


I've been trying to wrap current expressions into immutable functions, like `date_trunc`, without any luck.


--
Victor Y. Yegorov

[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