pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedclarify constraint exclusion vs prepared statements
2+ messages / 2 participants
[nested] [flat]
* clarify constraint exclusion vs prepared statements
@ 2017-04-27 20:23 john.christofolakos@gmail.com
2017-05-12 17:15 ` Re: clarify constraint exclusion vs prepared statements Bruce Momjian <bruce@momjian.us>
0 siblings, 1 reply; 2+ messages in thread
From: john.christofolakos@gmail.com @ 2017-04-27 20:23 UTC (permalink / raw)
To: pgsql-docs
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.
--
Sent via pgsql-docs mailing list (pgsql-docs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-docs
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: clarify constraint exclusion vs prepared statements
2017-04-27 20:23 clarify constraint exclusion vs prepared statements john.christofolakos@gmail.com
@ 2017-05-12 17:15 ` Bruce Momjian <bruce@momjian.us>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2017-05-12 17:15 UTC (permalink / raw)
To: john.christofolakos@gmail.com; +Cc: pgsql-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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2017-05-12 17:15 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-04-27 20:23 clarify constraint exclusion vs prepared statements john.christofolakos@gmail.com
2017-05-12 17:15 ` Bruce Momjian <bruce@momjian.us>
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