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:02:10 +0000 (10:02 +0900)
commit5c6296e97818f7b74bdce7aab84dc40d0bb38dc5
tree8706ea5dbabcf76cb99a930d5cf96a93fbaf1dd1
parent6ea8db1756ab03937cb0b190a83e74662d279414
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