Index: doc/src/sgml/ref/psql-ref.sgml =================================================================== RCS file: /cvsroot/pgsql/doc/src/sgml/ref/psql-ref.sgml,v retrieving revision 1.135 diff -c -c -r1.135 psql-ref.sgml *** doc/src/sgml/ref/psql-ref.sgml 28 Apr 2005 13:09:59 -0000 1.135 --- doc/src/sgml/ref/psql-ref.sgml 28 May 2005 16:23:01 -0000 *************** *** 590,599 **** precede it by a backslash. Anything contained in single quotes is furthermore subject to C-like substitutions for \n (new line), \t (tab), ! \digits, ! \0digits, and ! \0xdigits (the ! character with the given decimal, octal, or hexadecimal code). --- 590,598 ---- precede it by a backslash. Anything contained in single quotes is furthermore subject to C-like substitutions for \n (new line), \t (tab), ! \digits, and ! \xdigits (the ! character with the given octal or hexadecimal code). Index: src/bin/psql/psqlscan.l =================================================================== RCS file: /cvsroot/pgsql/src/bin/psql/psqlscan.l,v retrieving revision 1.10 diff -c -c -r1.10 psqlscan.l *** src/bin/psql/psqlscan.l 26 May 2005 01:24:29 -0000 1.10 --- src/bin/psql/psqlscan.l 28 May 2005 16:23:10 -0000 *************** *** 849,877 **** "\\r" { appendPQExpBufferChar(output_buf, '\r'); } "\\f" { appendPQExpBufferChar(output_buf, '\f'); } ! "\\"[1-9][0-9]* { ! /* decimal case */ ! appendPQExpBufferChar(output_buf, ! (char) strtol(yytext + 1, NULL, 0)); ! } ! ! "\\"0[0-7]* { /* octal case */ appendPQExpBufferChar(output_buf, ! (char) strtol(yytext + 1, NULL, 0)); } ! "\\"0[xX][0-9A-Fa-f]+ { /* hex case */ appendPQExpBufferChar(output_buf, ! (char) strtol(yytext + 1, NULL, 0)); ! } ! ! "\\"0[xX] { ! /* failed hex case */ ! yyless(2); ! appendPQExpBufferChar(output_buf, ! (char) strtol(yytext + 1, NULL, 0)); } "\\". { emit(yytext + 1, 1); } --- 849,864 ---- "\\r" { appendPQExpBufferChar(output_buf, '\r'); } "\\f" { appendPQExpBufferChar(output_buf, '\f'); } ! "\\"[0-7]{1,3} { /* octal case */ appendPQExpBufferChar(output_buf, ! (char) strtol(yytext + 1, NULL, 8)); } ! "\\"x[0-9A-Fa-f]{1,2} { /* hex case */ appendPQExpBufferChar(output_buf, ! (char) strtol(yytext + 2, NULL, 16)); } "\\". { emit(yytext + 1, 1); }