mirror of
https://github.com/postgres/postgres.git
synced 2025-05-09 18:21:05 +03:00
Fix broken {xufailed} production that made HEAD fail on
select u&42 from table-with-a-u-column; Also fix missing SET_YYLLOC() in the {dolqfailed} production that I suppose this was based on. The latter is a pre-existing bug, but the only effect is to misplace the error cursor by one token, so probably not worth backpatching.
This commit is contained in:
parent
334f4e12d8
commit
6a68f7fd3c
@ -24,7 +24,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.149 2009/03/04 13:02:32 petere Exp $
|
* $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.150 2009/04/14 22:18:47 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -553,6 +553,7 @@ other .
|
|||||||
startlit();
|
startlit();
|
||||||
}
|
}
|
||||||
{dolqfailed} {
|
{dolqfailed} {
|
||||||
|
SET_YYLLOC();
|
||||||
/* throw back all but the initial "$" */
|
/* throw back all but the initial "$" */
|
||||||
yyless(1);
|
yyless(1);
|
||||||
/* and treat it as {other} */
|
/* and treat it as {other} */
|
||||||
@ -646,10 +647,15 @@ other .
|
|||||||
<xd,xui><<EOF>> { yyerror("unterminated quoted identifier"); }
|
<xd,xui><<EOF>> { yyerror("unterminated quoted identifier"); }
|
||||||
|
|
||||||
{xufailed} {
|
{xufailed} {
|
||||||
|
char *ident;
|
||||||
|
|
||||||
|
SET_YYLLOC();
|
||||||
/* throw back all but the initial u/U */
|
/* throw back all but the initial u/U */
|
||||||
yyless(1);
|
yyless(1);
|
||||||
/* and treat it as {other} */
|
/* and treat it as {identifier} */
|
||||||
return yytext[0];
|
ident = downcase_truncate_identifier(yytext, yyleng, true);
|
||||||
|
yylval.str = ident;
|
||||||
|
return IDENT;
|
||||||
}
|
}
|
||||||
|
|
||||||
{typecast} {
|
{typecast} {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user