diff options
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/cube/cubescan.l | 4 | ||||
| -rw-r--r-- | contrib/seg/segscan.l | 3 | ||||
| -rw-r--r-- | contrib/tsearch/parser.l | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/contrib/cube/cubescan.l b/contrib/cube/cubescan.l index 8367477adb7..1b44397f460 100644 --- a/contrib/cube/cubescan.l +++ b/contrib/cube/cubescan.l @@ -7,6 +7,9 @@ #include "buffer.h" +/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */ +#define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg))) + /* flex screws a couple symbols when used with the -P option; fix those */ #define YY_DECL int cube_yylex YY_PROTO(( void )); \ @@ -52,6 +55,5 @@ float ({integer}|{real})([eE]{integer})? int cube_yylex(); void cube_flush_scanner_buffer(void) { - fprintf(stderr, "cube_flush_scanner_buffer called\n"); YY_FLUSH_BUFFER; } diff --git a/contrib/seg/segscan.l b/contrib/seg/segscan.l index c0962eca8c5..190174d7427 100644 --- a/contrib/seg/segscan.l +++ b/contrib/seg/segscan.l @@ -7,6 +7,9 @@ #include "buffer.h" +/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */ +#define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg))) + /* flex screws a couple symbols when used with the -P option; fix those */ #define YY_DECL int seg_yylex YY_PROTO(( void )); \ diff --git a/contrib/tsearch/parser.l b/contrib/tsearch/parser.l index fb34aac7137..4323bda7ef0 100644 --- a/contrib/tsearch/parser.l +++ b/contrib/tsearch/parser.l @@ -4,6 +4,9 @@ #include "deflex.h" #include "parser.h" +/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */ +#define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg))) + /* postgres allocation function */ #define free pfree #define malloc palloc |
