From 7d7cdde7181d4017d3887ac2baf9465ffe9a60d8 Mon Sep 17 00:00:00 2001 From: Takashi Suzuki Date: Fri, 31 May 2013 19:04:58 +0900 Subject: [PATCH] =?utf8?q?=E9=80=9A=E5=B8=B8=E3=81=AE=E3=82=AF=E3=82=A8?= =?utf8?q?=E3=83=AA=E3=81=A7=E3=82=82plpgsql=E3=81=AE=E3=82=AF=E3=82=A8?= =?utf8?q?=E3=83=AA=E3=81=AE=E3=82=88=E3=81=86=E3=81=AB=E6=89=B1=E3=81=A3?= =?utf8?q?=E3=81=A6=E3=81=97=E3=81=BE=E3=81=86=E3=83=90=E3=82=B0=E3=82=92?= =?utf8?q?=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=9F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- pg_hint_plan.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pg_hint_plan.c b/pg_hint_plan.c index 6a94125..db1082a 100644 --- a/pg_hint_plan.c +++ b/pg_hint_plan.c @@ -1358,8 +1358,10 @@ parse_head_comment(Query *parse) entry = FetchPreparedStatement(stmt_name, true); p = entry->plansource->query_string; } - else + else if (hint_query_string) p = hint_query_string; + else + p = debug_query_string; if (p == NULL) return NULL; @@ -2054,8 +2056,6 @@ pg_hint_plan_planner(Query *parse, int cursorOptions, ParamListInfo boundParams) } /* Create hint struct from parse tree. */ - if (!hint_query_string) - hint_query_string = debug_query_string; hstate = parse_head_comment(parse); /* -- 2.11.0