• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revisionb8f3e8a5d7d1ca17d2b478c194c9a9fe78d01c6a (tree)
Time2019-03-08 14:05:11
AuthorKyotaro Horiguchi <horiguchi.kyotaro@lab....>
CommiterKyotaro Horiguchi

Log Message

Silence some compilers

Some compilers seem to complain about the previous patch, that
prev_hint_str is used uninitialized. Actually it is not but move the
initialization code out of the PG_TRY() section so that such compilers
would be quiet.

Change Summary

Incremental Difference

--- a/pg_hint_plan.c
+++ b/pg_hint_plan.c
@@ -3087,19 +3087,19 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
30873087 }
30883088
30893089 /*
3090+ * The planner call below may replace current_hint_str. Store and restore
3091+ * it so that the subsequent planning in the upper level doesn't get
3092+ * confused.
3093+ */
3094+ recurse_level++;
3095+ prev_hint_str = current_hint_str;
3096+
3097+ /*
30903098 * Use PG_TRY mechanism to recover GUC parameters and current_hint_state to
30913099 * the state when this planner started when error occurred in planner.
30923100 */
30933101 PG_TRY();
30943102 {
3095- /*
3096- * The planner call below may replace current_hint_str. Store and
3097- * restore it so that the subsequent planning in the upper level
3098- * doesn't get confused.
3099- */
3100- recurse_level++;
3101- prev_hint_str = current_hint_str;
3102-
31033103 if (prev_planner)
31043104 result = (*prev_planner) (parse, cursorOptions, boundParams);
31053105 else
Show on old repository browser