• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: コミット

firtst release


コミットメタ情報

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

ログメッセージ

Remove an useless variable

commit 89149ce made the variable stmt_name useless. Remove it.

変更サマリ

差分

--- a/pg_hint_plan.c
+++ b/pg_hint_plan.c
@@ -556,12 +556,6 @@ static HintState *current_hint_state = NULL;
556556 */
557557 static List *HintStateStack = NIL;
558558
559-/*
560- * Holds statement name during executing EXECUTE command. NULL for other
561- * statements.
562- */
563-static char *stmt_name = NULL;
564-
565559 static const HintParser parsers[] = {
566560 {HINT_SEQSCAN, ScanMethodHintCreate, HINT_KEYWORD_SEQSCAN},
567561 {HINT_INDEXSCAN, ScanMethodHintCreate, HINT_KEYWORD_INDEXSCAN},
@@ -2909,8 +2903,8 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
29092903
29102904 if (debug_level > 1)
29112905 {
2912- if (debug_level == 1 &&
2913- (stmt_name || strcmp(query_str, debug_query_string)))
2906+ if (debug_level == 1 && query_str && debug_query_string &&
2907+ strcmp(query_str, debug_query_string))
29142908 ereport(pg_hint_plan_debug_message_level,
29152909 (errmsg("hints in comment=\"%s\"",
29162910 current_hint_str ? current_hint_str : "(none)"),
@@ -2918,9 +2912,9 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
29182912 errhidecontext(msgqno != qno)));
29192913 else
29202914 ereport(pg_hint_plan_debug_message_level,
2921- (errmsg("hints in comment=\"%s\", stmt=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
2915+ (errmsg("hints in comment=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
29222916 current_hint_str ? current_hint_str : "(none)",
2923- stmt_name, query_str, debug_query_string),
2917+ query_str, debug_query_string),
29242918 errhidestmt(msgqno != qno),
29252919 errhidecontext(msgqno != qno)));
29262920 msgqno = qno;
旧リポジトリブラウザで表示