From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | john(dot)christofolakos(at)gmail(dot)com |
Cc: | pgsql-docs(at)postgresql(dot)org |
Subject: | Re: clarify constraint exclusion vs prepared statements |
Date: | 2017-05-12 17:15:00 |
Message-ID: | 20170512171500.GC6721@momjian.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-docs |
On Thu, Apr 27, 2017 at 08:23:03PM +0000, john(dot)christofolakos(at)gmail(dot)com wrote:
> The following documentation comment has been logged on the website:
>
> Page: https://www.postgresql.org/docs/9.2/static/ddl-partitioning.html
> Description:
>
> Section 5.9.6 of the documentation discusses caveats re use of constraint
> exclusion on partitioned tables. It seems the restriction that the query
> constraints must be expressed in terms of constants has been lifted, and now
> constraints may be expressed in terms of parameterised values.
>
> I'm wondering if the restriction would still apply, though, in the case that
> the query is being prepared in advance, then the constraint value passed in
> as a parameter at execution time. It seems to me that constraint exclusion
> would not be applied in this case, but would like clarification on this
> point.
I think you are right that we don't support any constraint exclusion at
execution time, but using EXPLAIN should show you what it is doing.
--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2017-05-12 18:23:58 | remove doc/src/sgml/sql.sgml? |
Previous Message | Tom Lane | 2017-05-11 22:01:08 | Re: scale() return type is integer |