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.c20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c
index b3f96eb773c..b0660ad9776 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -2137,7 +2137,6 @@ match_special_index_operator(Expr *clause, Oid opfamily,
Oid expr_op;
Const *patt;
Const *prefix = NULL;
- Const *rest = NULL;
Pattern_Prefix_Status pstatus = Pattern_Prefix_None;
/*
@@ -2165,13 +2164,13 @@ match_special_index_operator(Expr *clause, Oid opfamily,
case OID_NAME_LIKE_OP:
/* the right-hand const is type text for all of these */
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Like,
- &prefix, &rest);
+ &prefix, NULL);
isIndexable = (pstatus != Pattern_Prefix_None);
break;
case OID_BYTEA_LIKE_OP:
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Like,
- &prefix, &rest);
+ &prefix, NULL);
isIndexable = (pstatus != Pattern_Prefix_None);
break;
@@ -2180,7 +2179,7 @@ match_special_index_operator(Expr *clause, Oid opfamily,
case OID_NAME_ICLIKE_OP:
/* the right-hand const is type text for all of these */
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Like_IC,
- &prefix, &rest);
+ &prefix, NULL);
isIndexable = (pstatus != Pattern_Prefix_None);
break;
@@ -2189,7 +2188,7 @@ match_special_index_operator(Expr *clause, Oid opfamily,
case OID_NAME_REGEXEQ_OP:
/* the right-hand const is type text for all of these */
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Regex,
- &prefix, &rest);
+ &prefix, NULL);
isIndexable = (pstatus != Pattern_Prefix_None);
break;
@@ -2198,7 +2197,7 @@ match_special_index_operator(Expr *clause, Oid opfamily,
case OID_NAME_ICREGEXEQ_OP:
/* the right-hand const is type text for all of these */
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Regex_IC,
- &prefix, &rest);
+ &prefix, NULL);
isIndexable = (pstatus != Pattern_Prefix_None);
break;
@@ -2454,7 +2453,6 @@ expand_indexqual_opclause(RestrictInfo *rinfo, Oid opfamily)
Oid expr_op = ((OpExpr *) clause)->opno;
Const *patt = (Const *) rightop;
Const *prefix = NULL;
- Const *rest = NULL;
Pattern_Prefix_Status pstatus;
/*
@@ -2474,7 +2472,7 @@ expand_indexqual_opclause(RestrictInfo *rinfo, Oid opfamily)
if (!op_in_opfamily(expr_op, opfamily))
{
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Like,
- &prefix, &rest);
+ &prefix, NULL);
return prefix_quals(leftop, opfamily, prefix, pstatus);
}
break;
@@ -2486,7 +2484,7 @@ expand_indexqual_opclause(RestrictInfo *rinfo, Oid opfamily)
{
/* the right-hand const is type text for all of these */
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Like_IC,
- &prefix, &rest);
+ &prefix, NULL);
return prefix_quals(leftop, opfamily, prefix, pstatus);
}
break;
@@ -2498,7 +2496,7 @@ expand_indexqual_opclause(RestrictInfo *rinfo, Oid opfamily)
{
/* the right-hand const is type text for all of these */
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Regex,
- &prefix, &rest);
+ &prefix, NULL);
return prefix_quals(leftop, opfamily, prefix, pstatus);
}
break;
@@ -2510,7 +2508,7 @@ expand_indexqual_opclause(RestrictInfo *rinfo, Oid opfamily)
{
/* the right-hand const is type text for all of these */
pstatus = pattern_fixed_prefix(patt, Pattern_Type_Regex_IC,
- &prefix, &rest);
+ &prefix, NULL);
return prefix_quals(leftop, opfamily, prefix, pstatus);
}
break;