firtst release
Revision | f1f3627b6a7f8cbf21683c5456f1d405f82daaa2 (tree) |
---|---|
Time | 2019-01-07 19:07:39 |
Author | Kyotaro Horiguchi <horiguchi.kyotaro@lab....> |
Commiter | Kyotaro Horiguchi |
Remove an useless variable
commit 64ab47b made the variable stmt_name useless. Remove it.
@@ -492,12 +492,6 @@ static HintState *current_hint = NULL; | ||
492 | 492 | */ |
493 | 493 | static List *HintStateStack = NIL; |
494 | 494 | |
495 | -/* | |
496 | - * Holds statement name during executing EXECUTE command. NULL for other | |
497 | - * statements. | |
498 | - */ | |
499 | -static char *stmt_name = NULL; | |
500 | - | |
501 | 495 | static const HintParser parsers[] = { |
502 | 496 | {HINT_SEQSCAN, ScanMethodHintCreate, HINT_KEYWORD_SEQSCAN}, |
503 | 497 | {HINT_INDEXSCAN, ScanMethodHintCreate, HINT_KEYWORD_INDEXSCAN}, |
@@ -2592,8 +2586,8 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query) | ||
2592 | 2586 | |
2593 | 2587 | if (debug_level > 1) |
2594 | 2588 | { |
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)) | |
2597 | 2591 | ereport(pg_hint_plan_debug_message_level, |
2598 | 2592 | (errmsg("hints in comment=\"%s\"", |
2599 | 2593 | current_hint_str ? current_hint_str : "(none)"), |
@@ -2601,9 +2595,10 @@ pg_hint_plan_post_parse_analyze(ParseState *pstate, Query *query) | ||
2601 | 2595 | errhidecontext(msgqno != qno))); |
2602 | 2596 | else |
2603 | 2597 | 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\"", | |
2605 | 2599 | 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)"), | |
2607 | 2602 | errhidestmt(msgqno != qno), |
2608 | 2603 | errhidecontext(msgqno != qno))); |
2609 | 2604 | msgqno = qno; |