Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5b7ba75

Browse files
committed
Remove unused function argument
The cache_plan argument to ri_PlanCheck has not been used sincee8c9fd5.Reviewed-by: vignesh C <vignesh21@gmail.com>Discussion:https://www.postgresql.org/message-id/flat/ec8a8b45-a30b-9193-cd4b-985d60d1497e%402ndquadrant.com
1 parent5f6b1eb commit5b7ba75

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

‎src/backend/utils/adt/ri_triggers.c

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -209,8 +209,7 @@ static const RI_ConstraintInfo *ri_FetchConstraintInfo(Trigger *trigger,
209209
Relationtrig_rel,boolrel_is_pk);
210210
staticconstRI_ConstraintInfo*ri_LoadConstraintInfo(OidconstraintOid);
211211
staticSPIPlanPtrri_PlanCheck(constchar*querystr,intnargs,Oid*argtypes,
212-
RI_QueryKey*qkey,Relationfk_rel,Relationpk_rel,
213-
boolcache_plan);
212+
RI_QueryKey*qkey,Relationfk_rel,Relationpk_rel);
214213
staticboolri_PerformCheck(constRI_ConstraintInfo*riinfo,
215214
RI_QueryKey*qkey,SPIPlanPtrqplan,
216215
Relationfk_rel,Relationpk_rel,
@@ -385,7 +384,7 @@ RI_FKey_check(TriggerData *trigdata)
385384

386385
/* Prepare and save the plan */
387386
qplan=ri_PlanCheck(querybuf.data,riinfo->nkeys,queryoids,
388-
&qkey,fk_rel,pk_rel, true);
387+
&qkey,fk_rel,pk_rel);
389388
}
390389

391390
/*
@@ -512,7 +511,7 @@ ri_Check_Pk_Match(Relation pk_rel, Relation fk_rel,
512511

513512
/* Prepare and save the plan */
514513
qplan=ri_PlanCheck(querybuf.data,riinfo->nkeys,queryoids,
515-
&qkey,fk_rel,pk_rel, true);
514+
&qkey,fk_rel,pk_rel);
516515
}
517516

518517
/*
@@ -704,7 +703,7 @@ ri_restrict(TriggerData *trigdata, bool is_no_action)
704703

705704
/* Prepare and save the plan */
706705
qplan=ri_PlanCheck(querybuf.data,riinfo->nkeys,queryoids,
707-
&qkey,fk_rel,pk_rel, true);
706+
&qkey,fk_rel,pk_rel);
708707
}
709708

710709
/*
@@ -809,7 +808,7 @@ RI_FKey_cascade_del(PG_FUNCTION_ARGS)
809808

810809
/* Prepare and save the plan */
811810
qplan=ri_PlanCheck(querybuf.data,riinfo->nkeys,queryoids,
812-
&qkey,fk_rel,pk_rel, true);
811+
&qkey,fk_rel,pk_rel);
813812
}
814813

815814
/*
@@ -931,7 +930,7 @@ RI_FKey_cascade_upd(PG_FUNCTION_ARGS)
931930

932931
/* Prepare and save the plan */
933932
qplan=ri_PlanCheck(querybuf.data,riinfo->nkeys*2,queryoids,
934-
&qkey,fk_rel,pk_rel, true);
933+
&qkey,fk_rel,pk_rel);
935934
}
936935

937936
/*
@@ -1110,7 +1109,7 @@ ri_set(TriggerData *trigdata, bool is_set_null)
11101109

11111110
/* Prepare and save the plan */
11121111
qplan=ri_PlanCheck(querybuf.data,riinfo->nkeys,queryoids,
1113-
&qkey,fk_rel,pk_rel, true);
1112+
&qkey,fk_rel,pk_rel);
11141113
}
11151114

11161115
/*
@@ -2128,8 +2127,7 @@ InvalidateConstraintCacheCallBack(Datum arg, int cacheid, uint32 hashvalue)
21282127
*/
21292128
staticSPIPlanPtr
21302129
ri_PlanCheck(constchar*querystr,intnargs,Oid*argtypes,
2131-
RI_QueryKey*qkey,Relationfk_rel,Relationpk_rel,
2132-
boolcache_plan)
2130+
RI_QueryKey*qkey,Relationfk_rel,Relationpk_rel)
21332131
{
21342132
SPIPlanPtrqplan;
21352133
Relationquery_rel;
@@ -2160,12 +2158,9 @@ ri_PlanCheck(const char *querystr, int nargs, Oid *argtypes,
21602158
/* Restore UID and security context */
21612159
SetUserIdAndSecContext(save_userid,save_sec_context);
21622160

2163-
/* Save the plan if requested */
2164-
if (cache_plan)
2165-
{
2166-
SPI_keepplan(qplan);
2167-
ri_HashPreparedPlan(qkey,qplan);
2168-
}
2161+
/* Save the plan */
2162+
SPI_keepplan(qplan);
2163+
ri_HashPreparedPlan(qkey,qplan);
21692164

21702165
returnqplan;
21712166
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp