aboutsummaryrefslogtreecommitdiff
path: root/src/backend/statistics/dependencies.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/statistics/dependencies.c')
-rw-r--r--src/backend/statistics/dependencies.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/backend/statistics/dependencies.c b/src/backend/statistics/dependencies.c
index bf698c1fc3f..744bc512b65 100644
--- a/src/backend/statistics/dependencies.c
+++ b/src/backend/statistics/dependencies.c
@@ -1692,7 +1692,6 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
{
int idx;
Node *expr;
- int k;
AttrNumber unique_attnum = InvalidAttrNumber;
AttrNumber attnum;
@@ -1740,15 +1739,15 @@ dependencies_clauselist_selectivity(PlannerInfo *root,
expr = (Node *) list_nth(stat->exprs, idx);
/* try to find the expression in the unique list */
- for (k = 0; k < unique_exprs_cnt; k++)
+ for (int m = 0; m < unique_exprs_cnt; m++)
{
/*
* found a matching unique expression, use the attnum
* (derived from index of the unique expression)
*/
- if (equal(unique_exprs[k], expr))
+ if (equal(unique_exprs[m], expr))
{
- unique_attnum = -(k + 1) + attnum_offset;
+ unique_attnum = -(m + 1) + attnum_offset;
break;
}
}