aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2009-04-14 22:18:47 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2009-04-14 22:18:47 +0000
commit6a68f7fd3c0bae4b23c089f6680c6badc1f1fb2c (patch)
treee93bbfe3b81a7e312026121a620d7beec9b9d4ad /src
parent334f4e12d827223f3567513c3a6f37b933989b47 (diff)
downloadpostgresql-6a68f7fd3c0bae4b23c089f6680c6badc1f1fb2c.tar.gz
postgresql-6a68f7fd3c0bae4b23c089f6680c6badc1f1fb2c.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/scan.l12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index 68372919ff5..a3d4d857c89 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -24,7 +24,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* 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();
}
{dolqfailed} {
+ SET_YYLLOC();
/* throw back all but the initial "$" */
yyless(1);
/* and treat it as {other} */
@@ -646,10 +647,15 @@ other .
<xd,xui><<EOF>> { yyerror("unterminated quoted identifier"); }
{xufailed} {
+ char *ident;
+
+ SET_YYLLOC();
/* throw back all but the initial u/U */
yyless(1);
- /* and treat it as {other} */
- return yytext[0];
+ /* and treat it as {identifier} */
+ ident = downcase_truncate_identifier(yytext, yyleng, true);
+ yylval.str = ident;
+ return IDENT;
}
{typecast} {