diff options
| author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-05-29 22:30:02 +0000 |
|---|---|---|
| committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-05-29 22:30:02 +0000 |
| commit | 5666462f2e60ffc5c7cf4670381313687625bae4 (patch) | |
| tree | c5d96da3ffb1c405cada8ec1609dda50a9ef6543 /contrib/tsearch/parser.l | |
| parent | 4fb5b92769e67aff9f9c4b838c047248e7e01f85 (diff) | |
| download | postgresql-5666462f2e60ffc5c7cf4670381313687625bae4.tar.gz | |
Ensure that in all flex lexers that are part of the backend, a
yy_fatal_error() call results in elog(ERROR) not exit(). This was
already fixed in the main lexer and plpgsql, but extend same technique
to all the other dot-l files. Also, on review of the possible calls
to yy_fatal_error(), it seems safe to use elog(ERROR) not elog(FATAL).
Diffstat (limited to 'contrib/tsearch/parser.l')
| -rw-r--r-- | contrib/tsearch/parser.l | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/contrib/tsearch/parser.l b/contrib/tsearch/parser.l index fb34aac713..4323bda7ef 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 |
