summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorTom Lane2016-06-07 21:21:17 +0000
committerTom Lane2016-06-07 21:21:17 +0000
commit77ba610805e7ef9ba9c9a593ea8b1ca8f98f8bcb (patch)
tree1c607e007c59f23ab471bb790e1237cf8d849e5e /src/include/nodes
parent5c6d2a5e7c83bf6e157fe4ca0ab9b123012289e9 (diff)
Revert "Use Foreign Key relationships to infer multi-column join selectivity".
This commit reverts 137805f89 as well as the associated commits 015e88942, 5306df283, and 68d704edb. We found multiple bugs in this feature, and there was concern about possible planner slowdown (though to be fair, exhibiting a very large slowdown proved difficult). The way forward requires a considerable rewrite, which may or may not be possible to accomplish in time for beta2. In my judgment reviewing the rewrite will be easier to accomplish starting from a clean slate, so let's temporarily revert what's there now. This also leaves us in a safe state if it turns out to be necessary to postpone the rewrite to the next development cycle. Discussion: <20160429102531.GA13701@huehner.biz>
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/nodes.h1
-rw-r--r--src/include/nodes/relation.h22
2 files changed, 0 insertions, 23 deletions
diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h
index ea65f2e453b..5953db45a89 100644
--- a/src/include/nodes/nodes.h
+++ b/src/include/nodes/nodes.h
@@ -223,7 +223,6 @@ typedef enum NodeTag
T_PlannerGlobal,
T_RelOptInfo,
T_IndexOptInfo,
- T_ForeignKeyOptInfo,
T_ParamPathInfo,
T_Path,
T_IndexPath,
diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h
index 45739c3ee7a..b1f6cf45f0b 100644
--- a/src/include/nodes/relation.h
+++ b/src/include/nodes/relation.h
@@ -516,7 +516,6 @@ typedef struct RelOptInfo
List *lateral_vars; /* LATERAL Vars and PHVs referenced by rel */
Relids lateral_referencers; /* rels that reference me laterally */
List *indexlist; /* list of IndexOptInfo */
- List *fkeylist; /* list of ForeignKeyOptInfo */
BlockNumber pages; /* size estimates derived from pg_class */
double tuples;
double allvisfrac;
@@ -623,27 +622,6 @@ typedef struct IndexOptInfo
void (*amcostestimate) (); /* AM's cost estimator */
} IndexOptInfo;
-/*
- * ForeignKeyOptInfo
- * Per-foreign-key information for planning/optimization
- *
- * Only includes columns from pg_constraint related to foreign keys.
- *
- * conkeys[], confkeys[] and conpfeqop[] each have nkeys entries.
- */
-typedef struct ForeignKeyOptInfo
-{
- NodeTag type;
-
- Oid conrelid; /* relation constrained by the foreign key */
- Oid confrelid; /* relation referenced by the foreign key */
-
- int nkeys; /* number of columns in the foreign key */
- int *conkeys; /* attnums of columns in the constrained table */
- int *confkeys; /* attnums of columns in the referenced table */
- Oid *conpfeqop; /* OIDs of equality operators used by the FK */
-
-} ForeignKeyOptInfo;
/*
* EquivalenceClasses