*** pgsql/src/backend/parser/scan.l 2009/09/25 20:51:37 1.160 --- pgsql/src/backend/parser/scan.l 2009/09/25 21:13:06 1.161 *************** *** 24,30 **** * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.159 2009/09/22 23:52:53 petere Exp $ * *------------------------------------------------------------------------- */ --- 24,30 ---- * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION ! * $PostgreSQL: pgsql/src/backend/parser/scan.l,v 1.160 2009/09/25 20:51:37 petere Exp $ * *------------------------------------------------------------------------- */ *************** litbuf_udeescape(unsigned char escape, b *** 1223,1228 **** --- 1223,1231 ---- yyerror("invalid Unicode surrogate pair"); } } + else if (is_utf16_surrogate_second(unicode)) + yyerror("invalid Unicode surrogate pair"); + if (is_utf16_surrogate_first(unicode)) pair_first = unicode; else *************** litbuf_udeescape(unsigned char escape, b *** 1253,1258 **** --- 1256,1264 ---- yyerror("invalid Unicode surrogate pair"); } } + else if (is_utf16_surrogate_second(unicode)) + yyerror("invalid Unicode surrogate pair"); + if (is_utf16_surrogate_first(unicode)) pair_first = unicode; else