Index: doc/src/sgml/ref/psql-ref.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v retrieving revision 1.137 diff -c -c -r1.137 psql-ref.sgml *** doc/src/sgml/ref/psql-ref.sgml 30 May 2005 15:24:23 -0000 1.137 --- doc/src/sgml/ref/psql-ref.sgml 30 May 2005 19:07:20 -0000 *************** *** 589,596 **** single quote. To include a single quote into such an argument, precede it by a backslash. Anything contained in single quotes is furthermore subject to C-like substitutions for ! \n (new line), \t (tab), and ! \digits (octal). --- 589,597 ---- single quote. To include a single quote into such an argument, precede it by a backslash. Anything contained in single quotes is furthermore subject to C-like substitutions for ! \n (new line), \t (tab), ! \digits (octal), ! \xdigits (hexadecimal). Index: src/bin/psql/psqlscan.l =================================================================== RCS file: /cvsroot/pgsql/src/bin/psql/psqlscan.l,v retrieving revision 1.12 diff -c -c -r1.12 psqlscan.l *** src/bin/psql/psqlscan.l 30 May 2005 16:48:47 -0000 1.12 --- src/bin/psql/psqlscan.l 30 May 2005 19:07:25 -0000 *************** *** 250,257 **** xqstart {quote} xqdouble {quote}{quote} xqinside [^\\']+ ! xqescape [\\][^0-7] xqoctesc [\\][0-7]{1,3} /* $foo$ style quotes ("dollar quoting") * The quoted string starts with $foo$ where "foo" is an optional string --- 250,258 ---- xqstart {quote} xqdouble {quote}{quote} xqinside [^\\']+ ! 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 *************** *** 467,472 **** --- 468,476 ---- {xqoctesc} { ECHO; } + {xqhexesc} { + ECHO; + } {quotecontinue} { ECHO; } *************** *** 855,860 **** --- 859,870 ---- (char) strtol(yytext + 1, NULL, 8)); } + {xqhexesc} { + /* hex case */ + appendPQExpBufferChar(output_buf, + (char) strtol(yytext + 2, NULL, 16)); + } + "\\". { emit(yytext + 1, 1); } {other}|\n { ECHO; }