Syntax error messages from the parser can contain garbled characters.
Apply this patch.
===================================================================
*** 1.22 1995/05/16 00:11:29
--- src/backend/parser/gram.y 1995/05/31 21:19:10
***************
*** 1933,1946 ****
param_type_init(typev, nargs);
}
- void yyerror(char message[])
- {
- extern char yytext[];
-
- elog(WARN, "parser: %s at or near \"%s\"\n", message, yytext);
- }
-
- int yywrap()
- {
- return(1);
- }
--- 1933,1935 ----
===================================================================
*** 1.4 1995/05/08 01:08:15
--- src/backend/parser/scan.l 1995/05/31 21:22:37
***************
*** 25,30 ****
--- 25,31 ----
#include "nodes/parsenodes.h"
#include "parser/keywords.h"
#include "parse.h"
+ #include "utils/elog.h"
/*
* This is actually conditional on use of "flex" instead of "lex"
***************
*** 173,178 ****
--- 174,190 ----
%%
+ void yyerror(char message[])
+ {
+ /* extern char yytext[]; */
+ elog(WARN, "parser: %s at or near \"%s\"\n", message, yytext);
+ }
+
+ int yywrap()
+ {
+ return(1);
+ }
+
#if defined(__linux__) || defined(__NetBSD__)
/*
* Switch to new input (discard the read buffer)