• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: Commit

firtst release


Commit MetaInfo

Revisioncb78687c4dc102498087d59dc407a67a07fe8df0 (tree)
Time2019-03-08 14:05:51
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
@@ -3077,19 +3077,19 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
30773077 }
30783078
30793079 /*
3080+ * The planner call below may replace current_hint_str. Store and restore
3081+ * it so that the subsequent planning in the upper level doesn't get
3082+ * confused.
3083+ */
3084+ recurse_level++;
3085+ prev_hint_str = current_hint_str;
3086+
3087+ /*
30803088 * Use PG_TRY mechanism to recover GUC parameters and current_hint_state to
30813089 * the state when this planner started when error occurred in planner.
30823090 */
30833091 PG_TRY();
30843092 {
3085- /*
3086- * The planner call below may replace current_hint_str. Store and
3087- * restore it so that the subsequent planning in the upper level
3088- * doesn't get confused.
3089- */
3090- recurse_level++;
3091- prev_hint_str = current_hint_str;
3092-
30933093 if (prev_planner)
30943094 result = (*prev_planner) (parse, cursorOptions, boundParams);
30953095 else
Show on old repository browser