Fix thinko in tok_is_keyword(): it was looking at the wrong union variant

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 399da7d882dff22b7ad926fb07aafeda2feab999
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2010-06-25T16:40:13Z
Releases: 9.0.0
Fix thinko in tok_is_keyword(): it was looking at the wrong union variant
of YYSTYPE, and hence returning the wrong answer for cases where a plpgsql
"unreserved keyword" really does conflict with a variable name.  Obviously
I didn't test this enough :-(.  Per bug #5524 from Peter Gagarinov.

Files

PathChange+/−
src/pl/plpgsql/src/gram.y modified +3 −3
src/test/regress/expected/plpgsql.out modified +14 −0
src/test/regress/sql/plpgsql.sql modified +14 −0