aboutsummaryrefslogtreecommitdiff
path: root/src/backend/utils
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2005-07-23 21:05:48 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2005-07-23 21:05:48 +0000
commitd007a95055b9b649b74b5d25aa4d2b46f3eca21c (patch)
treee726c049f96af578181432ae4da176cf3cbcb970 /src/backend/utils
parent9af9d674c61ca1c2e26d7a9295d5b1bcc8cabb60 (diff)
downloadpostgresql-d007a95055b9b649b74b5d25aa4d2b46f3eca21c.tar.gz
postgresql-d007a95055b9b649b74b5d25aa4d2b46f3eca21c.zip
Simple constraint exclusion. For now, only child tables of inheritance
scans are candidates for exclusion; this should be fixed eventually. Simon Riggs, with some help from Tom Lane.
Diffstat (limited to 'src/backend/utils')
-rw-r--r--src/backend/utils/misc/guc.c12
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample1
2 files changed, 12 insertions, 1 deletions
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 20ebfee7126..6400ef566b2 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -10,7 +10,7 @@
* Written by Peter Eisentraut <peter_e@gmx.net>.
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.276 2005/07/21 18:06:12 momjian Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.277 2005/07/23 21:05:47 tgl Exp $
*
*--------------------------------------------------------------------
*/
@@ -436,6 +436,16 @@ static struct config_bool ConfigureNamesBool[] =
true, NULL, NULL
},
{
+ {"enable_constraint_exclusion", PGC_USERSET, QUERY_TUNING_OTHER,
+ gettext_noop("Enables the planner's use of constraints in queries."),
+ gettext_noop("Constraints will be examined to exclude tables "
+ "that can be proven not to be required to produce "
+ "a correct result for the query.")
+ },
+ &enable_constraint_exclusion,
+ false, NULL, NULL
+ },
+ {
{"geqo", PGC_USERSET, QUERY_TUNING_GEQO,
gettext_noop("Enables genetic query optimization."),
gettext_noop("This algorithm attempts to do planning without "
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index dc06658e7f3..db8c28814db 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -173,6 +173,7 @@
# - Other Planner Options -
#default_statistics_target = 10 # range 1-1000
+#enable_constraint_exclusion = off
#from_collapse_limit = 8
#join_collapse_limit = 8 # 1 disables collapsing of explicit JOINs