OSDN Git Service

Fix a crash bug in case debug_query_string is NULL
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Thu, 24 May 2018 09:18:29 +0000 (18:18 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Fri, 8 Jun 2018 01:03:33 +0000 (10:03 +0900)
commit6cec5f7c2e867197d0786fe298588ceb114ab4bd
tree6c101f9f733c560847b43c3f5683f7270009c949
parent0a1445a0f04d7c864ddfab03f87e00dfb3b7186d
Fix a crash bug in case debug_query_string is NULL

pg_hint_plan believed that debug_query_string cannot be null when
parse_analyze is called, but for example in the case under
exec_describe_statement_message, it is not. We see the query string in
pstate even in the case, so use it instead in the case. Since pstate
is storing the query of the lowermost level, we should use
debug_query_string in other cases.
pg_hint_plan.c