OSDN Git Service

Fix a crash bug on complex views when enable_hint_table is on
authorKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Thu, 18 May 2017 09:43:09 +0000 (18:43 +0900)
committerKyotaro Horiguchi <horiguchi.kyotaro@lab.ntt.co.jp>
Thu, 18 May 2017 10:52:13 +0000 (19:52 +0900)
commitc05bb31d1e15f2f04f6da842eee9bfef868ec466
tree656c1a2bdd42b833072a14dcb5357bc1ddcdf0e2
parent3ea75abb8719a0cef8ad944bcf2d653e19fff6e4
Fix a crash bug on complex views when enable_hint_table is on

The Query that planner receives sometimes irrelevant to
debug_query_string. If enable_hint_table is on, pg_hint_plan_planner
normalizes debug_query_string using query-jumble information created
from the irrelevant Query the can lead to crash. To avoid this
situation, retrieve hints in post_parse_analyze_hook, where
corresponding pairs of a query string and a parsed Query.
pg_hint_plan.c