• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: コミット

firtst release


コミットメタ情報

リビジョンd6150269b77def355bc485049e3ce66133f160af (tree)
日時2019-01-07 19:07:10
作者Kyotaro Horiguchi <horiguchi.kyotaro@lab....>
コミッターKyotaro Horiguchi

ログメッセージ

Remove an useless variable

commit 3f6c983 made the variable stmt_name useless. Remove it.

変更サマリ

差分

--- a/pg_hint_plan.c
+++ b/pg_hint_plan.c
@@ -492,12 +492,6 @@ static HintState *current_hint = NULL;
492492 */
493493 static List *HintStateStack = NIL;
494494
495-/*
496- * Holds statement name during executing EXECUTE command. NULL for other
497- * statements.
498- */
499-static char *stmt_name = NULL;
500-
501495 static const HintParser parsers[] = {
502496 {HINT_SEQSCAN, ScanMethodHintCreate, HINT_KEYWORD_SEQSCAN},
503497 {HINT_INDEXSCAN, ScanMethodHintCreate, HINT_KEYWORD_INDEXSCAN},
@@ -2589,17 +2583,18 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
25892583
25902584 if (debug_level > 1)
25912585 {
2592- if (debug_level == 1 &&
2593- (stmt_name || strcmp(query_str, debug_query_string)))
2586+ if (debug_level == 1 && query_str && debug_query_string &&
2587+ strcmp(query_str, debug_query_string))
25942588 ereport(pg_hint_plan_debug_message_level,
25952589 (errmsg("hints in comment=\"%s\"",
25962590 current_hint_str ? current_hint_str : "(none)"),
25972591 errhidestmt(msgqno != qno)));
25982592 else
25992593 ereport(pg_hint_plan_debug_message_level,
2600- (errmsg("hints in comment=\"%s\", stmt=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
2594+ (errmsg("hints in comment=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
26012595 current_hint_str ? current_hint_str : "(none)",
2602- stmt_name, query_str, debug_query_string),
2596+ query_str ? query_str : "(none)",
2597+ debug_query_string ? debug_query_string : "(none)"),
26032598 errhidestmt(msgqno != qno)));
26042599 msgqno = qno;
26052600 }
旧リポジトリブラウザで表示