Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 67849c8

Browse files
committed
Use elog() instead of exit() for fatal scanner errors.
1 parent 251de13 commit 67849c8

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/backend/parser/scan.l

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.85 2001/01/24 19:43:03 momjian Exp $
12+
* $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.86 2001/02/03 20:13:05 petere Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -55,6 +55,9 @@ static int myinput(char* buf, int max);
5555
/* No reason to constrain amount of data slurped per myinput() call. */
5656
#define YY_READ_BUF_SIZE 16777216
5757

58+
/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
59+
#define fprintf(file, fmt, msg) elog(FATAL, "%s", (msg))
60+
5861
#else /* !FLEX_SCANNER */
5962

6063
#undef input

0 commit comments

Comments
 (0)