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>
Thu, 24 May 2018 09:18:29 +0000 (18:18 +0900)
commitc56520a41063c0403afc6ec972b0eabffc19668c
tree440d6f8e5834f5c06573674b1da641d2c9c33103
parentb42417509f5afbfb5c06b827a2ff7a5f0b75dfae
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