OSDN Git Service

Allow USING and INTO clauses of plpgsql's EXECUTE to appear in either order.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Aug 2010 18:58:04 +0000 (18:58 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 19 Aug 2010 18:58:04 +0000 (18:58 +0000)
commit4a1989ffd5bb7c93c7ccf860061a5142d5935268
tree96016f0278ea8e84e8a36e576aae326c3db11a6c
parentf5c496b7f55fbe054d299cdbbac225bfdd47c848
Allow USING and INTO clauses of plpgsql's EXECUTE to appear in either order.

Aside from being more forgiving, this prevents a rather surprising misbehavior
when the "wrong" order was used: the old code didn't throw a syntax error,
but absorbed the INTO clause into the last USING expression, which then did
strange things downstream.

Intentionally not changing the documentation; we'll continue to advertise
only the "standard" clause order.

Backpatch to 8.4, where the USING clause was added to EXECUTE.
src/pl/plpgsql/src/gram.y