diff options
| author | Tom Lane | 2010-06-25 16:40:13 +0000 |
|---|---|---|
| committer | Tom Lane | 2010-06-25 16:40:13 +0000 |
| commit | 399da7d882dff22b7ad926fb07aafeda2feab999 (patch) | |
| tree | 52ce13ba93e80836a85ad95b3eb161e48c98f4bc /src/pl | |
| parent | 3bdd23932b2a1d0dcae5b10e639108c2430ca9f0 (diff) | |
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.
Diffstat (limited to 'src/pl')
| -rw-r--r-- | src/pl/plpgsql/src/gram.y | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/pl/plpgsql/src/gram.y b/src/pl/plpgsql/src/gram.y index e866d10a65a..3a78fe69c75 100644 --- a/src/pl/plpgsql/src/gram.y +++ b/src/pl/plpgsql/src/gram.y @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.142 2010/03/03 01:53:17 tgl Exp $ + * $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.143 2010/06/25 16:40:13 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -2080,8 +2080,8 @@ tok_is_keyword(int token, union YYSTYPE *lval, * match composite names (hence an unreserved word followed by "." * will not be recognized). */ - if (!lval->word.quoted && lval->word.ident != NULL && - strcmp(lval->word.ident, kw_str) == 0) + if (!lval->wdatum.quoted && lval->wdatum.ident != NULL && + strcmp(lval->wdatum.ident, kw_str) == 0) return true; } return false; /* not the keyword */ |
