• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

firtst release


Commit MetaInfo

修订版f1f3627b6a7f8cbf21683c5456f1d405f82daaa2 (tree)
时间2019-01-07 19:07:39
作者Kyotaro Horiguchi <horiguchi.kyotaro@lab....>
CommiterKyotaro Horiguchi

Log Message

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;