aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/parser/scan.l9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index ef5c1a639f1..161a32861f6 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.122 2005/05/26 01:24:29 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.123 2005/06/02 01:23:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -193,8 +193,9 @@ xnstart [nN]{quote}
xqstart {quote}
xqdouble {quote}{quote}
xqinside [^\\']+
-xqescape [\\][^0-7]
+xqescape [\\][^0-7x]
xqoctesc [\\][0-7]{1,3}
+xqhexesc [\\]x[0-9A-Fa-f]{1,2}
/* $foo$ style quotes ("dollar quoting")
* The quoted string starts with $foo$ where "foo" is an optional string
@@ -435,6 +436,10 @@ other .
unsigned char c = strtoul(yytext+1, NULL, 8);
addlitchar(c);
}
+<xq>{xqhexesc} {
+ unsigned char c = strtoul(yytext+2, NULL, 16);
+ addlitchar(c);
+ }
<xq>{quotecontinue} {
/* ignore */
}