• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: コミット

firtst release


コミットメタ情報

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

ログメッセージ

Remove an useless variable

commit 64ab47b 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},
@@ -2592,8 +2586,8 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
25922586
25932587 if (debug_level > 1)
25942588 {
2595- if (debug_level == 1 &&
2596- (stmt_name || strcmp(query_str, debug_query_string)))
2589+ if (debug_level == 1 && query_str && debug_query_string &&
2590+ strcmp(query_str, debug_query_string))
25972591 ereport(pg_hint_plan_debug_message_level,
25982592 (errmsg("hints in comment=\"%s\"",
25992593 current_hint_str ? current_hint_str : "(none)"),
@@ -2601,9 +2595,10 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
26012595 errhidecontext(msgqno != qno)));
26022596 else
26032597 ereport(pg_hint_plan_debug_message_level,
2604- (errmsg("hints in comment=\"%s\", stmt=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
2598+ (errmsg("hints in comment=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
26052599 current_hint_str ? current_hint_str : "(none)",
2606- stmt_name, query_str, debug_query_string),
2600+ query_str ? query_str : "(none)",
2601+ debug_query_string ? debug_query_string : "(none)"),
26072602 errhidestmt(msgqno != qno),
26082603 errhidecontext(msgqno != qno)));
26092604 msgqno = qno;
旧リポジトリブラウザで表示