mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-12 18:34:36 +08:00
Correct an omission in the syntax error message emitted by EXECUTE INTO
in pl/pgsql.
This commit is contained in:
parent
fbc4edfba7
commit
593badd30b
@ -4,7 +4,7 @@
|
|||||||
* procedural language
|
* procedural language
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.73 2005/06/07 02:47:16 neilc Exp $
|
* $PostgreSQL: pgsql/src/pl/plpgsql/src/gram.y,v 1.74 2005/06/08 00:49:36 neilc Exp $
|
||||||
*
|
*
|
||||||
* This software is copyrighted by Jan Wieck - Hamburg.
|
* This software is copyrighted by Jan Wieck - Hamburg.
|
||||||
*
|
*
|
||||||
@ -1263,13 +1263,12 @@ stmt_dynexecute : K_EXECUTE lno
|
|||||||
new->cmd_type = PLPGSQL_STMT_DYNEXECUTE;
|
new->cmd_type = PLPGSQL_STMT_DYNEXECUTE;
|
||||||
new->lineno = $2;
|
new->lineno = $2;
|
||||||
new->query = expr;
|
new->query = expr;
|
||||||
|
|
||||||
new->rec = NULL;
|
new->rec = NULL;
|
||||||
new->row = NULL;
|
new->row = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If we saw "INTO", look for an additional
|
* If we saw "INTO", look for a following row
|
||||||
* row or record var.
|
* var, record var, or list of scalars.
|
||||||
*/
|
*/
|
||||||
if (endtoken == K_INTO)
|
if (endtoken == K_INTO)
|
||||||
{
|
{
|
||||||
@ -1293,9 +1292,9 @@ stmt_dynexecute : K_EXECUTE lno
|
|||||||
plpgsql_error_lineno = $2;
|
plpgsql_error_lineno = $2;
|
||||||
ereport(ERROR,
|
ereport(ERROR,
|
||||||
(errcode(ERRCODE_SYNTAX_ERROR),
|
(errcode(ERRCODE_SYNTAX_ERROR),
|
||||||
errmsg("syntax error at \"%s\"",
|
errmsg("syntax error at \"%s\"", yytext),
|
||||||
yytext),
|
errdetail("Expected record variable, row variable, "
|
||||||
errdetail("Expected record or row variable.")));
|
"or list of scalar variables.")));
|
||||||
}
|
}
|
||||||
if (yylex() != ';')
|
if (yylex() != ';')
|
||||||
yyerror("syntax error");
|
yyerror("syntax error");
|
||||||
|
Loading…
Reference in New Issue
Block a user