summaryrefslogtreecommitdiff
path: root/src/backend/optimizer
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/optimizer')
-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 e43e12d8832..f3c9915d436 100644
--- a/src/backend/optimizer/path/indxpath.c
+++ b/src/backend/optimizer/path/indxpath.c
@@ -2219,7 +2219,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;
/*
@@ -2247,13 +2246,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;
@@ -2262,7 +2261,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;
@@ -2271,7 +2270,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;
@@ -2280,7 +2279,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;
@@ -2536,7 +2535,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;
/*
@@ -2556,7 +2554,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;
@@ -2568,7 +2566,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;
@@ -2580,7 +2578,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;
@@ -2592,7 +2590,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;