From: Bruce Momjian <bruce@momjian.us>
To: john.christofolakos@gmail.com
Cc: pgsql-docs@postgresql.org
Subject: Re: clarify constraint exclusion vs prepared statements
Date: Fri, 12 May 2017 13:15:00 -0400
Message-ID: <20170512171500.GC6721@momjian.us> (raw)
In-Reply-To: <20170427202303.24360.26831@wrigleys.postgresql.org>
References: <20170427202303.24360.26831@wrigleys.postgresql.org>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-docs>
On Thu, Apr 27, 2017 at 08:23:03PM +0000, john.christofolakos@gmail.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@momjian.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 +
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-docs@postgresql.org
Cc: bruce@momjian.us, john.christofolakos@gmail.com
Subject: Re: clarify constraint exclusion vs prepared statements
In-Reply-To: <20170512171500.GC6721@momjian.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox