aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/parser')
-rw-r--r--src/backend/parser/Makefile10
-rw-r--r--src/backend/parser/gram.y4
-rw-r--r--src/backend/parser/scan.l12
3 files changed, 13 insertions, 13 deletions
diff --git a/src/backend/parser/Makefile b/src/backend/parser/Makefile
index 5720452f818..b6698d2ae2f 100644
--- a/src/backend/parser/Makefile
+++ b/src/backend/parser/Makefile
@@ -2,7 +2,7 @@
#
# Makefile for parser
#
-# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.40 2003/02/10 04:44:45 tgl Exp $
+# $Header: /cvsroot/pgsql/src/backend/parser/Makefile,v 1.41 2003/05/29 20:40:36 tgl Exp $
#
#-------------------------------------------------------------------------
@@ -38,17 +38,11 @@ gram.o: $(srcdir)/scan.c
$(srcdir)/gram.c: $(srcdir)/parse.h ;
-# The sed hack is so that we can get the same error messages with
-# bison 1.875 and later as we did with earlier bisons. Eventually,
-# I suppose, we should re-standardize on "syntax error" --- in which
-# case flip the sed translation, but don't remove it.
-
$(srcdir)/parse.h: gram.y
ifdef YACC
$(YACC) -d $(YFLAGS) $<
- sed -e 's/"syntax error/"parse error/' < y.tab.c > $(srcdir)/gram.c
+ mv -f y.tab.c $(srcdir)/gram.c
mv -f y.tab.h $(srcdir)/parse.h
- rm -f y.tab.c
else
@$(missing) bison $< $@
endif
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y
index 681738253bb..ec2f3316091 100644
--- a/src/backend/parser/gram.y
+++ b/src/backend/parser/gram.y
@@ -11,7 +11,7 @@
*
*
* IDENTIFICATION
- * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.415 2003/05/28 16:03:57 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/gram.y,v 2.416 2003/05/29 20:40:36 tgl Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@@ -4680,7 +4680,7 @@ table_ref: relation_expr
* popular demand, but for now let's just implement
* the spec and see if anyone complains.
* However, it does seem like a good idea to emit
- * an error message that's better than "parse error".
+ * an error message that's better than "syntax error".
*/
elog(ERROR, "sub-SELECT in FROM must have an alias"
"\n\tFor example, FROM (SELECT ...) [AS] foo");
diff --git a/src/backend/parser/scan.l b/src/backend/parser/scan.l
index c1f53ac8ebb..6cb5972b2f6 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.105 2003/04/27 20:09:44 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/scan.l,v 1.106 2003/05/29 20:40:36 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -581,13 +581,19 @@ yyerror(const char *message)
cursorpos = pg_mbstrlen_with_len(scanbuf, loc - scanbuf) + 1;
if (*loc == YY_END_OF_BUFFER_CHAR)
+ {
+ /* translator: %s is typically "syntax error" */
ereport(ERROR,
- (errmsg("parser: %s at end of input", message),
+ (errmsg("%s at end of input", message),
errposition(cursorpos)));
+ }
else
+ {
+ /* translator: first %s is typically "syntax error" */
ereport(ERROR,
- (errmsg("parser: %s at or near \"%s\"", message, loc),
+ (errmsg("%s at or near \"%s\"", message, loc),
errposition(cursorpos)));
+ }
}