Search Postgresql Archives

Re: Problem with constraint exclusion on partitions

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

 



Hey David,

> What version are you using?

Sorry, I'm on 9.3.4.

>Now() is a volatile function so the planner cannot omit partitions.
>
>Replace that with a constant and now it can.

I'm not sure what you mean- now() is a stable function:

cloud_test2=# \df+ now()

   Schema   | Name |     Result data type     | Argument data types |  Type
| Security | Volatility | Owner | Language | Source code |       Description

------------+------+--------------------------+---------------------+-------
-+----------+------------+-------+----------+-------------+-----------------
---------
 pg_catalog | now  | timestamp with time zone |                     | normal
| invoker  | stable     | pgres | internal | now         | current
transaction time


it's the timestamp at the start of the transaction- so the planner should
have a set value for all rows.

Am I missing something else?

Mike





-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[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