PostgreSQL executes queries using cost-based optimizer, and sometimes fails to choose most optimized execution plan or some types of queries. In such cases, pg_hint_plan helps users to guide the planner to choose the plans they want by putting some nstructions - call them hints - in the comments prefixed to the SQL statement body. No need to rewrite statement tself nor change some GUC parameters elsewhere.
Two bugs related to queries executed from PL/PGSQL functions are fixed. Both bugs cause pg_hint_plan to continue to see the false hint string left behind on two situations during executing SQL queries on PL/PGSQL functions. One is executing dynamic queries using EXECUTE command and the another is non-local exit from queries.
PL/PGSQL関数内でのクエリ実行に関係する2つのバグを修正しました。特定の状況下でPL/PGSQL関数内で実行されたクエリで使われたヒントが実行終了後も残ってしまい、その後に実行される問い合わせでその間違ったヒントに従った動作をしてしまうということが起き得ます。ひとつは EXECUTE を使った動的SQL文の実行を行なった場合、そしてもう一つは実行されたSQL文が大域脱出(ERRORなど)で終了した場合です。