• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: コミット

firtst release


コミットメタ情報

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

ログメッセージ

Remove an useless variable

commit c05bb31 made the variable stmt_name useless. Remove it.

変更サマリ

差分

--- a/pg_hint_plan.c
+++ b/pg_hint_plan.c
@@ -554,12 +554,6 @@ static HintState *current_hint_state = NULL;
554554 */
555555 static List *HintStateStack = NIL;
556556
557-/*
558- * Holds statement name during executing EXECUTE command. NULL for other
559- * statements.
560- */
561-static char *stmt_name = NULL;
562-
563557 static const HintParser parsers[] = {
564558 {HINT_SEQSCAN, ScanMethodHintCreate, HINT_KEYWORD_SEQSCAN},
565559 {HINT_INDEXSCAN, ScanMethodHintCreate, HINT_KEYWORD_INDEXSCAN},
@@ -2904,8 +2898,8 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
29042898
29052899 if (debug_level > 1)
29062900 {
2907- if (debug_level == 1 &&
2908- (stmt_name || strcmp(query_str, debug_query_string)))
2901+ if (debug_level == 1 && query_str && debug_query_string &&
2902+ strcmp(query_str, debug_query_string))
29092903 ereport(pg_hint_plan_debug_message_level,
29102904 (errmsg("hints in comment=\"%s\"",
29112905 current_hint_str ? current_hint_str : "(none)"),
@@ -2913,9 +2907,10 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
29132907 errhidecontext(msgqno != qno)));
29142908 else
29152909 ereport(pg_hint_plan_debug_message_level,
2916- (errmsg("hints in comment=\"%s\", stmt=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
2910+ (errmsg("hints in comment=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
29172911 current_hint_str ? current_hint_str : "(none)",
2918- stmt_name, query_str, debug_query_string),
2912+ query_str ? query_str : "(none)",
2913+ debug_query_string ? debug_query_string : "(none)"),
29192914 errhidestmt(msgqno != qno),
29202915 errhidecontext(msgqno != qno)));
29212916 msgqno = qno;
旧リポジトリブラウザで表示