pg_hint_plan
pg_hint_plan copied to clipboard
Query Errors if pg_hint_plan.enable_hint_table and enable_hint is enabled but hints table does not exist
if a user enables enable_hint_table
and enable_hint
but the hint_plan.hints
does not exist, it will lead to query failure.
I don't think this should result in an error, but should be silently ignored ( with a message with debug_print
)
postgres=# set pg_hint_plan.enable_hint_table = "on";
SET
postgres=# set pg_hint_plan.enable_hint = "on";
SET
postgres=# select 1;
ERROR: relation "hint_plan.hints" does not exist
LINE 1: SELECT hints FROM hint_plan.hints WHERE norm_query_string...
^
QUERY: SELECT hints FROM hint_plan.hints WHERE norm_query_string = $1 AND ( application_name = $2 OR application_name = '' ) ORDER BY application_name DESC
Regards,
Sami