aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/backend/bootstrap/bootscanner.l8
-rw-r--r--src/backend/parser/scan.l4
-rw-r--r--src/backend/utils/misc/guc-file.l5
-rw-r--r--src/pl/plpgsql/src/scan.l4
4 files changed, 14 insertions, 7 deletions
diff --git a/src/backend/bootstrap/bootscanner.l b/src/backend/bootstrap/bootscanner.l
index f0c1027c88c..fbb104c18a1 100644
--- a/src/backend/bootstrap/bootscanner.l
+++ b/src/backend/bootstrap/bootscanner.l
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.27 2002/11/04 14:22:32 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootscanner.l,v 1.28 2003/05/29 22:30:01 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -44,7 +44,11 @@
/* #include "bootstrap_tokens.h" */
-int yyline; /* keep track of the line number for error reporting */
+/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
+#define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg)))
+
+
+static int yyline; /* keep track of the line number for error reporting */
%}
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index 6cb5972b2f6..083c19e650c 100644
--- a/src/backend/parser/scan.l
+++ b/src/backend/parser/scan.l
@@ -9,7 +9,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.106 2003/05/29 20:40:36 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.107 2003/05/29 22:30:02 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -33,7 +33,7 @@
#define YY_READ_BUF_SIZE 16777216
/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
-#define fprintf(file, fmt, msg) ereport(FATAL, (errmsg_internal("%s", msg)))
+#define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg)))
extern YYSTYPE yylval;
diff --git a/src/backend/utils/misc/guc-file.l b/src/backend/utils/misc/guc-file.l
index 3c4601c0fc2..778f003e4d0 100644
--- a/src/backend/utils/misc/guc-file.l
+++ b/src/backend/utils/misc/guc-file.l
@@ -4,7 +4,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.15 2003/05/27 17:49:46 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.16 2003/05/29 22:30:02 tgl Exp $
*/
%{
@@ -21,6 +21,9 @@
#include "utils/elog.h"
#include "utils/guc.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)))
+
#define CONFIG_FILENAME "postgresql.conf"
static unsigned ConfigFileLineno;
diff --git a/src/pl/plpgsql/src/scan.l b/src/pl/plpgsql/src/scan.l
index 5f7e162f08e..e6614bf8100 100644
--- a/src/pl/plpgsql/src/scan.l
+++ b/src/pl/plpgsql/src/scan.l
@@ -4,7 +4,7 @@
* procedural language
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/scan.l,v 1.25 2003/05/05 16:46:28 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/Attic/scan.l,v 1.26 2003/05/29 22:30:02 tgl Exp $
*
* This software is copyrighted by Jan Wieck - Hamburg.
*
@@ -43,7 +43,7 @@
#define YY_READ_BUF_SIZE 16777216
/* Avoid exit() on fatal scanner errors (a bit ugly -- see yy_fatal_error) */
-#define fprintf(file, fmt, msg) ereport(FATAL, (errmsg_internal("%s", msg)))
+#define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg)))
/* Handles to the buffer that the lexer uses internally */
static YY_BUFFER_STATE scanbufhandle;