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 11<!--
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 $
33PostgreSQL documentation
44-->
55
@@ -589,8 +589,9 @@ testdb=>
589589 single quote. To include a single quote into such an argument,
590590 precede it by a backslash. Anything contained in single quotes is
591591 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).
594595 </para>
595596
596597 <para>
Original file line number Diff line number Diff line change 3333 * Portions Copyright (c) 1994, Regents of the University of California
3434 *
3535 * 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 $
3737 *
3838 *-------------------------------------------------------------------------
3939 */
@@ -250,8 +250,9 @@ xnstart [nN]{quote}
250250xqstart {quote}
251251xqdouble {quote}{quote}
252252xqinside [^\\' ]+
253- xqescape [\\ ][^0-7 ]
253+ xqescape [\\ ][^0-7x ]
254254xqoctesc [\\ ][0-7]{1,3}
255+ xqhexesc [\\ ]x[0-9A-Fa-f]{1,2}
255256
256257/* $foo$ style quotes ("dollar quoting")
257258 * The quoted string starts with $foo$ where "foo" is an optional string
@@ -467,6 +468,9 @@ other .
467468<xq>{xqoctesc} {
468469 ECHO;
469470 }
471+ <xq>{xqhexesc} {
472+ ECHO;
473+ }
470474<xq>{quotecontinue} {
471475 ECHO;
472476 }
@@ -855,6 +859,12 @@ other .
855859 (char ) strtol (yytext + 1 , NULL , 8 ));
856860 }
857861
862+ {xqhexesc} {
863+ /* hex case */
864+ appendPQExpBufferChar (output_buf,
865+ (char ) strtol (yytext + 2 , NULL , 16 ));
866+ }
867+
858868" \\ " . { emit (yytext + 1 , 1 ); }
859869
860870{other}|\n { ECHO; }
You can’t perform that action at this time.
0 commit comments