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

Commit 337f802

Browse files
committed
Fix slightly-wrong syntax error messages from bootstrap parser, as per
report from Tom Cook.
1 parent 7e64dbc commit 337f802

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/bootstrap/bootscanner.l

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/bootstrap/bootscanner.l,v 1.35 2004/06/03 02:08:02 tgl Exp $
12+
* $PostgreSQL: pgsql/src/backend/bootstrap/bootscanner.l,v 1.36 2004/06/09 19:49:56 tgl Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -45,7 +45,7 @@
4545
#define fprintf(file, fmt, msg) ereport(ERROR, (errmsg_internal("%s", msg)))
4646

4747

48-
static int yyline; /* keep track of the line number for error reporting */
48+
static int yyline = 1; /* line number for error reporting */
4949

5050
%}
5151

@@ -135,7 +135,7 @@ insert { return(INSERT_TUPLE); }
135135
%%
136136

137137
void
138-
yyerror(const char *str)
138+
yyerror(const char *message)
139139
{
140-
elog(ERROR, "syntax error at line %d: unexpected token \"%s\"", yyline, str);
140+
elog(ERROR, "%s at line %d", message, yyline);
141141
}

0 commit comments

Comments
 (0)