Re: Constraint exclusion for timestamp expression - Mailing list pgsql-general

From Victor Yegorov
Subject Re: Constraint exclusion for timestamp expression
Date
Msg-id CAGnEboj-Ln0SJXrpMMp-8vyzQDGHuw0rEsgdqM-U3rzLU_zfLg@mail.gmail.com
Whole thread Raw
In response to Re: Constraint exclusion for timestamp expression  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
2014-05-20 14:26 GMT+03:00 Tom Lane <tgl@sss.pgh.pa.us>:
Victor Yegorov <vyegorov@gmail.com> 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

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Constraint exclusion for timestamp expression
Next
From: Ondrej Chaloupka
Date:
Subject: Revoking permission on view pg_prepared_xacts