summaryrefslogtreecommitdiff
path: root/src/backend/optimizer/path/indxpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer/path/indxpath.c')
-rw-r--r--src/backend/optimizer/path/indxpath.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index 2230b131047..c0fcc7d78df 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -3441,22 +3441,6 @@ relation_has_unique_index_for(PlannerInfo *root, RelOptInfo *rel,
List *restrictlist,
List *exprlist, List *oprlist)
{
- return relation_has_unique_index_ext(root, rel, restrictlist,
- exprlist, oprlist, NULL);
-}
-
-/*
- * relation_has_unique_index_ext
- * Same as relation_has_unique_index_for(), but supports extra_clauses
- * parameter. If extra_clauses isn't NULL, return baserestrictinfo clauses
- * which were used to derive uniqueness.
- */
-bool
-relation_has_unique_index_ext(PlannerInfo *root, RelOptInfo *rel,
- List *restrictlist,
- List *exprlist, List *oprlist,
- List **extra_clauses)
-{
ListCell *ic;
Assert(list_length(exprlist) == list_length(oprlist));
@@ -3511,7 +3495,6 @@ relation_has_unique_index_ext(PlannerInfo *root, RelOptInfo *rel,
{
IndexOptInfo *ind = (IndexOptInfo *) lfirst(ic);
int c;
- List *exprs = NIL;
/*
* If the index is not unique, or not immediately enforced, or if it's
@@ -3563,24 +3546,6 @@ relation_has_unique_index_ext(PlannerInfo *root, RelOptInfo *rel,
if (match_index_to_operand(rexpr, c, ind))
{
matched = true; /* column is unique */
-
- if (bms_membership(rinfo->clause_relids) == BMS_SINGLETON)
- {
- MemoryContext oldMemCtx =
- MemoryContextSwitchTo(root->planner_cxt);
-
- /*
- * Add filter clause into a list allowing caller to
- * know if uniqueness have made not only by join
- * clauses.
- */
- Assert(bms_is_empty(rinfo->left_relids) ||
- bms_is_empty(rinfo->right_relids));
- if (extra_clauses)
- exprs = lappend(exprs, rinfo);
- MemoryContextSwitchTo(oldMemCtx);
- }
-
break;
}
}
@@ -3623,11 +3588,7 @@ relation_has_unique_index_ext(PlannerInfo *root, RelOptInfo *rel,
/* Matched all key columns of this index? */
if (c == ind->nkeycolumns)
- {
- if (extra_clauses)
- *extra_clauses = exprs;
return true;
- }
}
return false;