Skip to content

Commit 6a68f7f

Browse files
committed
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.
1 parent 334f4e1 commit 6a68f7f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/backend/parser/scan.l

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Portions Copyright (c) 1994, Regents of the University of California
2525
*
2626
* IDENTIFICATION
27-
* $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.149 2009/03/04 13:02:32 petere Exp $
27+
* $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.150 2009/04/14 22:18:47 tgl Exp $
2828
*
2929
*-------------------------------------------------------------------------
3030
*/
@@ -553,6 +553,7 @@ other .
553553
startlit();
554554
}
555555
{dolqfailed} {
556+
SET_YYLLOC();
556557
/* throw back all but the initial "$" */
557558
yyless(1);
558559
/* and treat it as {other} */
@@ -646,10 +647,15 @@ other .
646647
<xd,xui><<EOF>> { yyerror("unterminated quoted identifier"); }
647648

648649
{xufailed} {
650+
char *ident;
651+
652+
SET_YYLLOC();
649653
/* throw back all but the initial u/U */
650654
yyless(1);
651-
/* and treat it as {other} */
652-
return yytext[0];
655+
/* and treat it as {identifier} */
656+
ident = downcase_truncate_identifier(yytext, yyleng, true);
657+
yylval.str = ident;
658+
return IDENT;
653659
}
654660

655661
{typecast} {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy