OSDN Git Service

Fix plpgsql to not lookup block labels except in contexts where a block label
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 27 Nov 2007 19:58:44 +0000 (19:58 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 27 Nov 2007 19:58:44 +0000 (19:58 +0000)
commita54d3fb2e6ce3db9d0c3ad911ae6165e527b21f5
tree11e6e1d3c75813384107f098ac500768c88e2481
parent42fd80de532fb02676a7f26d5de0a31f35e8794b
Fix plpgsql to not lookup block labels except in contexts where a block label
is sane (eg, EXIT argument or first part of a qualified identifier), and cause
more-closely-nested record variables to take precedence over outer block
labels.  This cures the breakage exhibited by Marko Kreen that 8.3 no longer
allowed a function's name to be used for a variable within the function, and
makes plpgsql's handling of block labels more like Oracle's.  It's important
to fix this now because we are documenting the use of block labels as variable
qualifiers for the first time in 8.3.
src/pl/plpgsql/src/gram.y
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/pl_funcs.c
src/pl/plpgsql/src/plpgsql.h