Skip to content

Commit e046b3d

Browse files
committed
Add \x hex support to ecpg strings. This just passes them to the backend.
1 parent d1944de commit e046b3d

File tree

1 file changed

+6
-4
lines changed
  • src/interfaces/ecpg/preproc

1 file changed

+6
-4
lines changed

src/interfaces/ecpg/preproc/pgc.l

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
*
1313
*
1414
* IDENTIFICATION
15-
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.135 2005/02/02 15:37:43 meskes Exp $
15+
* $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/pgc.l,v 1.136 2005/06/16 01:43:48 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -139,8 +139,9 @@ xqstart {quote}
139139
xqstop {quote}
140140
xqdouble {quote}{quote}
141141
xqinside [^\\']+
142-
xqescape [\\][^0-7]
143-
xqoctesc [\\][0-7]{1,3}
142+
xqescape [\\][^0-7]
143+
xqoctesc [\\][0-7]{1,3}
144+
xqhexesc [\\]x[0-9A-Fa-f]{1,2}
144145
xqcat {quote}{whitespace_with_newline}{quote}
145146

146147
/* $foo$ style quotes ("dollar quoting")
@@ -400,7 +401,8 @@ cppline {space}*#(.*\\{space})*.*{newline}
400401
<xq>{xqdouble} { addlitchar('\''); }
401402
<xq>{xqinside} { addlit(yytext, yyleng); }
402403
<xq>{xqescape} { addlit(yytext, yyleng); }
403-
<xq>{xqoctesc} { addlit(yytext, yyleng); }
404+
<xq>{xqoctesc} { addlit(yytext, yyleng); }
405+
<xq>{xqhexesc} { addlit(yytext, yyleng); }
404406
<xq>{xqcat} { /* ignore */ }
405407
<xq>. {
406408
/* This is only needed for \ just before EOF */

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