summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Lane2012-08-23 03:55:34 +0000
committerTom Lane2012-08-23 03:55:57 +0000
commitead31d1a72b1a99b2741c42adc951564992fb24f (patch)
treec3d642b816ee2412be021935437536dee3921bce
parentd3337731277c3f65209fc39986627c66033812e9 (diff)
Remove overly-pessimistic statement about constraint exclusion.
As of 9.2, constraint exclusion should work okay with prepared statements: the planner will try custom plans with actual values of the parameters, and observe that they are a lot cheaper than the generic plan, and thus never fall back to using the generic plan. Noted by Tatsuhito Kasahara.
-rw-r--r--doc/src/sgml/ddl.sgml10
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/src/sgml/ddl.sgml b/doc/src/sgml/ddl.sgml
index ea840fb8468..e52dff2dd52 100644
--- a/doc/src/sgml/ddl.sgml
+++ b/doc/src/sgml/ddl.sgml
@@ -2964,11 +2964,11 @@ ANALYZE measurement;
<listitem>
<para>
Constraint exclusion only works when the query's <literal>WHERE</>
- clause contains constants. A parameterized query will not be
- optimized, since the planner cannot know which partitions the
- parameter value might select at run time. For the same reason,
- <quote>stable</> functions such as <function>CURRENT_DATE</function>
- must be avoided.
+ clause contains constants (or externally supplied parameters).
+ For example, a comparison against a non-immutable function such as
+ <function>CURRENT_TIMESTAMP</function> cannot be optimized, since the
+ planner cannot know which partition the function value might fall
+ into at run time.
</para>
</listitem>