*** a/src/backend/parser/gram.y --- b/src/backend/parser/gram.y *************** *** 60,69 **** --- 60,75 ---- #include "utils/date.h" #include "utils/datetime.h" #include "utils/numeric.h" #include "utils/xml.h" + /* + * bison does not re-use buffers, so we can redefine malloc/free + * to palloc/pfree. + */ + #define malloc palloc + #define free pfree /* Location tracking support --- simpler than bison's default */ #define YYLLOC_DEFAULT(Current, Rhs, N) \ do { \ if (N) \ *************** TableFuncTypeName(List *columns) *** 10017,10022 **** --- 10023,10032 ---- * Must undefine base_yylex before including scan.c, since we want it * to create the function base_yylex not filtered_base_yylex. */ #undef base_yylex + /* scan.c needs real malloc */ + #undef malloc + #undef free + #include "scan.c"