Skip site navigation (1) Skip section navigation (2)

pgsql: Fix plpgsql named-cursor-parameter feature for variable namecon

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix plpgsql named-cursor-parameter feature for variable namecon
Date: 2012-04-05 01:50:42
Message-ID: E1SFbqU-0007kB-8i@gemulon.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
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.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/05dbd4a7734e09bd1f835f4197d9befa1c00c4f3

Modified Files
--------------
src/pl/plpgsql/src/gram.y             |   39 ++++++++++++++++++--------------
src/test/regress/expected/plpgsql.out |   19 ++++++++++++++++
src/test/regress/sql/plpgsql.sql      |   15 ++++++++++++
3 files changed, 56 insertions(+), 17 deletions(-)

pgsql-committers by date

Next:From: Robert HaasDate: 2012-04-05 15:46:01
Subject: pgsql: Expose track_iotiming data via the statistics collector.
Previous:From: Tom LaneDate: 2012-04-04 22:40:37
Subject: pgsql: Add a "row processor" API to libpq for better handling oflarge

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group