OSDN Git Service
(root)
/
pghintplan
/
pg_hint_plan.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2889ddb
)
PL/pgSQLのカーソルFORループ文で指定ヒントが適用されないバグを修正した。
author
Takashi Suzuki
<suzuki.takashi@metrosystems.co.jp>
Tue, 17 Sep 2013 02:04:23 +0000
(11:04 +0900)
committer
Takashi Suzuki
<suzuki.takashi@metrosystems.co.jp>
Tue, 17 Sep 2013 02:04:23 +0000
(11:04 +0900)
PL/pgSQLのカーソルFORループのときに、カーソルのクエリ文字列ではな
くカーソルの引数の代入用クエリ文字列を取得していたため、ヒントが適
用されなかった。
pg_hint_plan.c
patch
|
blob
|
history
diff --git
a/pg_hint_plan.c
b/pg_hint_plan.c
index
7785742
..
d03ddb2
100644
(file)
--- a/
pg_hint_plan.c
+++ b/
pg_hint_plan.c
@@
-3595,7
+3595,7
@@
pg_hint_plan_plpgsql_stmt_beg(PLpgSQL_execstate *estate, PLpgSQL_stmt *stmt)
expr = ((PLpgSQL_stmt_fors *) stmt)->query;
break;
case PLPGSQL_STMT_FORC:
-
expr = ((PLpgSQL_stmt_forc *) stmt)->argquery
;
+
expr = ((PLpgSQL_var *) (estate->datums[((PLpgSQL_stmt_forc *)stmt)->curvar]))->cursor_explicit_expr
;
break;
case PLPGSQL_STMT_RETURN_QUERY:
if (((PLpgSQL_stmt_return_query *) stmt)->query != NULL)