firtst release
Revision | e001299f71870fc2cda86328a3306495b9a809b4 (tree) |
---|---|
Time | 2013-09-05 18:37:51 |
Author | Takashi Suzuki <suzuki.takashi@metr...> |
Commiter | Takashi Suzuki |
PL/pgSQL文の様々パターンに対応するために条件分岐コマンドを変更した。
@@ -3587,10 +3587,15 @@ set_rel_pathlist(PlannerInfo *root, RelOptInfo *rel, | ||
3587 | 3587 | static void |
3588 | 3588 | pg_hint_plan_plpgsql_stmt_beg(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt) |
3589 | 3589 | { |
3590 | - if ((enum PLpgSQL_stmt_types) stmt->cmd_type == PLPGSQL_STMT_EXECSQL) | |
3590 | + PLpgSQL_expr *expr; | |
3591 | + switch ((enum PLpgSQL_stmt_types) stmt->cmd_type) | |
3591 | 3592 | { |
3592 | - PLpgSQL_expr *expr = ((PLpgSQL_stmt_execsql *) stmt)->sqlstmt; | |
3593 | - plpgsql_query_string = expr->query; | |
3593 | + case PLPGSQL_STMT_EXECSQL: | |
3594 | + expr = ((PLpgSQL_stmt_execsql *) stmt)->sqlstmt; | |
3595 | + plpgsql_query_string = expr->query; | |
3596 | + break; | |
3597 | + default: | |
3598 | + break; | |
3594 | 3599 | } |
3595 | 3600 | } |
3596 | 3601 |