Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf4b4a46

Browse files
committed
Keep exec_simple_check_plan() from thinking "SELECT foo INTO bar" is simple.
It's not clear if this situation can occur in plpgsql other than via theEXECUTE USING case Heikki illustrated, which I will shortly close off.However, ignoring the intoClause if it's there is surely wrong, so let'spatch it for safety.Backpatch to 8.3, which is as far back as this code has a PlannedStmtto deal with. There might be another way to make an equivalent testbefore that, but since this is just preventing hypothetical bugs,I'm not going to obsess about it.
1 parent3869e9a commitf4b4a46

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/pl/plpgsql/src/pl_exec.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.265 2010/08/1917:31:43 tgl Exp $
11+
* $PostgreSQL: pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.266 2010/08/1918:10:48 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -5280,6 +5280,8 @@ exec_simple_check_plan(PLpgSQL_expr *expr)
52805280
*/
52815281
if (!IsA(stmt,PlannedStmt))
52825282
return;
5283+
if (stmt->commandType!=CMD_SELECT||stmt->intoClause)
5284+
return;
52835285
plan=stmt->planTree;
52845286
if (!IsA(plan,Result))
52855287
return;

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp