File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change 1
1
<!--
2
- $PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.137 2005/05/30 15:24:23 momjian Exp $
2
+ $PostgreSQL: pgsql/doc/src/sgml/ref/psql-ref.sgml,v 1.138 2005/06/02 01:23:48 momjian Exp $
3
3
PostgreSQL documentation
4
4
-->
5
5
@@ -589,8 +589,9 @@ testdb=>
589
589
single quote. To include a single quote into such an argument,
590
590
precede it by a backslash. Anything contained in single quotes is
591
591
furthermore subject to C-like substitutions for
592
- <literal>\n</literal> (new line), <literal>\t</literal> (tab), and
593
- <literal>\</literal><replaceable>digits</replaceable> (octal).
592
+ <literal>\n</literal> (new line), <literal>\t</literal> (tab),
593
+ <literal>\</literal><replaceable>digits</replaceable> (octal),
594
+ <literal>\x</literal><replaceable>digits</replaceable> (hexadecimal).
594
595
</para>
595
596
596
597
<para>
Original file line number Diff line number Diff line change 33
33
* Portions Copyright (c) 1994, Regents of the University of California
34
34
*
35
35
* IDENTIFICATION
36
- * $PostgreSQL: pgsql/src/bin/psql/psqlscan.l,v 1.12 2005/05/30 16:48:47 momjian Exp $
36
+ * $PostgreSQL: pgsql/src/bin/psql/psqlscan.l,v 1.13 2005/06/02 01:23:48 momjian Exp $
37
37
*
38
38
*-------------------------------------------------------------------------
39
39
*/
@@ -250,8 +250,9 @@ xnstart [nN]{quote}
250
250
xqstart {quote}
251
251
xqdouble {quote}{quote}
252
252
xqinside [^\\' ]+
253
- xqescape [\\ ][^0-7 ]
253
+ xqescape [\\ ][^0-7x ]
254
254
xqoctesc [\\ ][0-7]{1,3}
255
+ xqhexesc [\\ ]x[0-9A-Fa-f]{1,2}
255
256
256
257
/* $foo$ style quotes ("dollar quoting")
257
258
* The quoted string starts with $foo$ where "foo" is an optional string
@@ -467,6 +468,9 @@ other .
467
468
<xq>{xqoctesc} {
468
469
ECHO;
469
470
}
471
+ <xq>{xqhexesc} {
472
+ ECHO;
473
+ }
470
474
<xq>{quotecontinue} {
471
475
ECHO;
472
476
}
@@ -855,6 +859,12 @@ other .
855
859
(char ) strtol (yytext + 1 , NULL , 8 ));
856
860
}
857
861
862
+ {xqhexesc} {
863
+ /* hex case */
864
+ appendPQExpBufferChar (output_buf,
865
+ (char ) strtol (yytext + 2 , NULL , 16 ));
866
+ }
867
+
858
868
" \\ " . { emit (yytext + 1 , 1 ); }
859
869
860
870
{other}|\n { ECHO; }
You can’t perform that action at this time.
0 commit comments