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:07:44 +0000 (10:07 +0900)
commit816040df7e7ee159007895743fec7e76f7f10e90
treeae8f14b50f44060cfae1ae7cd7c830312f49a869
parent997e099c8681195b2f8f576f5db256a749e59010
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