]> granicus.if.org Git - postgresql/commit
Fix plpgsql named-cursor-parameter feature for variable name conflicts.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 5 Apr 2012 01:50:31 +0000 (21:50 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 5 Apr 2012 01:50:31 +0000 (21:50 -0400)
commit05dbd4a7734e09bd1f835f4197d9befa1c00c4f3
tree3e6acdcebc87eb9719642b82ed4898ce946bc8ea
parent6f922ef88e43b3084cdddf4b5ffe525a00896a90
Fix plpgsql named-cursor-parameter feature for variable name conflicts.

The parser got confused if a cursor parameter had the same name as
a plpgsql variable.  Reported and diagnosed by Yeb Havinga, though
this isn't exactly his proposed fix.

Also, some mostly-but-not-entirely-cosmetic adjustments to the original
named-cursor-parameter patch, for code readability and better error
diagnostics.
src/pl/plpgsql/src/gram.y
src/test/regress/expected/plpgsql.out
src/test/regress/sql/plpgsql.sql