aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2005-08-22 17:35:03 +0000
committerBruce Momjian <bruce@momjian.us>2005-08-22 17:35:03 +0000
commita7f49252d2476cc5996b1e9dbb253cdc521fbb7f (patch)
treeb12fba122b4fa746216da5235ffa62d84eb0d291 /src
parent8ad3965a115bbd5fbd1bb2f3585c2e34d569af7d (diff)
downloadpostgresql-a7f49252d2476cc5996b1e9dbb253cdc521fbb7f.tar.gz
postgresql-a7f49252d2476cc5996b1e9dbb253cdc521fbb7f.zip
enable_constraint_exclusion => constraint_exclusion
Also improve wording.
Diffstat (limited to 'src')
-rw-r--r--src/backend/optimizer/path/allpaths.c6
-rw-r--r--src/backend/utils/misc/guc.c13
-rw-r--r--src/backend/utils/misc/postgresql.conf.sample2
-rw-r--r--src/include/optimizer/cost.h4
-rw-r--r--src/test/regress/expected/rangefuncs.out5
5 files changed, 14 insertions, 16 deletions
diff --git a/src/backend/optimizer/path/allpaths.c b/src/backend/optimizer/path/allpaths.c
index 124534914f8..aa14deacd0c 100644
--- a/src/backend/optimizer/path/allpaths.c
+++ b/src/backend/optimizer/path/allpaths.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.135 2005/07/23 21:05:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/optimizer/path/allpaths.c,v 1.136 2005/08/22 17:34:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,7 +36,7 @@
/* These parameters are set by GUC */
-bool enable_constraint_exclusion = false;
+bool constraint_exclusion = false;
bool enable_geqo = false; /* just in case GUC doesn't set it */
int geqo_threshold;
@@ -318,7 +318,7 @@ set_inherited_rel_pathlist(PlannerInfo *root, RelOptInfo *rel,
* exclusion, just ignore it. (We have to have converted the
* baserestrictinfo Vars before we can make the test.)
*/
- if (enable_constraint_exclusion)
+ if (constraint_exclusion)
{
List *constraint_pred;
diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 6fd3d9fc5c4..29e0e409307 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.285 2005/08/21 03:39:34 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/utils/misc/guc.c,v 1.286 2005/08/22 17:34:59 momjian Exp $
*
*--------------------------------------------------------------------
*/
@@ -453,13 +453,12 @@ 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.")
+ {"constraint_exclusion", PGC_USERSET, QUERY_TUNING_OTHER,
+ gettext_noop("Enables the planner to use constraints to limit table access."),
+ gettext_noop("This prevents table access if the table constraints "
+ "guarantee that table access is necessary.")
},
- &enable_constraint_exclusion,
+ &constraint_exclusion,
false, NULL, NULL
},
{
diff --git a/src/backend/utils/misc/postgresql.conf.sample b/src/backend/utils/misc/postgresql.conf.sample
index 48152e8ed26..6049aafe191 100644
--- a/src/backend/utils/misc/postgresql.conf.sample
+++ b/src/backend/utils/misc/postgresql.conf.sample
@@ -190,7 +190,7 @@
# - Other Planner Options -
#default_statistics_target = 10 # range 1-1000
-#enable_constraint_exclusion = off
+#constraint_exclusion = off
#from_collapse_limit = 8
#join_collapse_limit = 8 # 1 disables collapsing of explicit
# JOINs
diff --git a/src/include/optimizer/cost.h b/src/include/optimizer/cost.h
index a6988e45991..4162b632fcc 100644
--- a/src/include/optimizer/cost.h
+++ b/src/include/optimizer/cost.h
@@ -7,7 +7,7 @@
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.69 2005/07/23 21:05:48 tgl Exp $
+ * $PostgreSQL: pgsql/src/include/optimizer/cost.h,v 1.70 2005/08/22 17:35:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -49,7 +49,7 @@ extern bool enable_hashagg;
extern bool enable_nestloop;
extern bool enable_mergejoin;
extern bool enable_hashjoin;
-extern bool enable_constraint_exclusion;
+extern bool constraint_exclusion;
extern double clamp_row_est(double nrows);
extern void cost_seqscan(Path *path, PlannerInfo *root, RelOptInfo *baserel);
diff --git a/src/test/regress/expected/rangefuncs.out b/src/test/regress/expected/rangefuncs.out
index 3172d16b88f..42f770ff55a 100644
--- a/src/test/regress/expected/rangefuncs.out
+++ b/src/test/regress/expected/rangefuncs.out
@@ -1,8 +1,7 @@
SELECT name, setting FROM pg_settings WHERE name LIKE 'enable%';
name | setting
------------------------------+---------
+-------------------+---------
enable_bitmapscan | on
- enable_constraint_exclusion | off
enable_hashagg | on
enable_hashjoin | on
enable_indexscan | on
@@ -11,7 +10,7 @@ SELECT name, setting FROM pg_settings WHERE name LIKE 'enable%';
enable_seqscan | on
enable_sort | on
enable_tidscan | on
-(10 rows)
+(9 rows)
CREATE TABLE foo2(fooid int, f2 int);
INSERT INTO foo2 VALUES(1, 11);