]> granicus.if.org Git - postgresql/commit
Keep exec_simple_check_plan() from thinking "SELECT foo INTO bar" is simple.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Aug 2010 18:11:02 +0000 (18:11 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Aug 2010 18:11:02 +0000 (18:11 +0000)
commita1bde80db45fe9f123abb2a493b9dfcb755d427d
tree3442c58fde21b851202c1d421a6984d1c803197c
parentf958310a85ba6e9c50c52ccf98ebd5425136931c
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 the
EXECUTE USING case Heikki illustrated, which I will shortly close off.
However, ignoring the intoClause if it's there is surely wrong, so let's
patch it for safety.

Backpatch to 8.3, which is as far back as this code has a PlannedStmt
to deal with.  There might be another way to make an equivalent test
before that, but since this is just preventing hypothetical bugs,
I'm not going to obsess about it.
src/pl/plpgsql/src/pl_exec.c