Fix WHERE CURRENT OF to work as designed within plpgsql. The argument
Tom Lane <tgl@sss.pgh.pa.us>
Fix WHERE CURRENT OF to work as designed within plpgsql. The argument can be the name of a plpgsql cursor variable, which formerly was converted to $N before the core parser saw it, but that's no longer the case. Deal with plain name references to plpgsql variables, and add a regression test case that exposes the failure.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/executor/execCurrent.c | modified | +5 −5 |
| src/backend/parser/gram.y | modified | +1 −9 |
| src/backend/parser/parse_expr.c | modified | +35 −25 |
| src/test/regress/expected/plpgsql.out | modified | +46 −0 |
| src/test/regress/sql/plpgsql.sql | modified | +20 −0 |