• R/O
  • HTTP
  • SSH
  • HTTPS

pg_hint_plan: コミット

firtst release


コミットメタ情報

リビジョンeb5f0ea75c32357313dba06c7982e2ee8c4c534a (tree)
日時2019-01-07 19:08:05
作者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
@@ -563,12 +563,6 @@ static HintState *current_hint_state = NULL;
563563 */
564564 static List *HintStateStack = NIL;
565565
566-/*
567- * Holds statement name during executing EXECUTE command. NULL for other
568- * statements.
569- */
570-static char *stmt_name = NULL;
571-
572566 static const HintParser parsers[] = {
573567 {HINT_SEQSCAN, ScanMethodHintCreate, HINT_KEYWORD_SEQSCAN},
574568 {HINT_INDEXSCAN, ScanMethodHintCreate, HINT_KEYWORD_INDEXSCAN},
@@ -2913,8 +2907,8 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
29132907
29142908 if (debug_level > 1)
29152909 {
2916- if (debug_level == 1 &&
2917- (stmt_name || strcmp(query_str, debug_query_string)))
2910+ if (debug_level == 1 && query_str && debug_query_string &&
2911+ strcmp(query_str, debug_query_string))
29182912 ereport(pg_hint_plan_debug_message_level,
29192913 (errmsg("hints in comment=\"%s\"",
29202914 current_hint_str ? current_hint_str : "(none)"),
@@ -2922,9 +2916,10 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query)
29222916 errhidecontext(msgqno != qno)));
29232917 else
29242918 ereport(pg_hint_plan_debug_message_level,
2925- (errmsg("hints in comment=\"%s\", stmt=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
2919+ (errmsg("hints in comment=\"%s\", query=\"%s\", debug_query_string=\"%s\"",
29262920 current_hint_str ? current_hint_str : "(none)",
2927- stmt_name, query_str, debug_query_string),
2921+ query_str ? query_str : "(none)",
2922+ debug_query_string ? debug_query_string : "(none)"),
29282923 errhidestmt(msgqno != qno),
29292924 errhidecontext(msgqno != qno)));
29302925 msgqno = qno;
旧リポジトリブラウザで表示