while-do报错信息有误

This commit is contained in:
qianxue
2023-10-13 02:27:17 -04:00
parent b76821b2c6
commit db656d0bde
2 changed files with 2 additions and 2 deletions

View File

@ -3465,7 +3465,7 @@ stmt_while : opt_block_label K_WHILE expr_until_while_loop loop_body
{
if($3.endtoken != K_LOOP)
ereport(ERROR,
(errcode(ERRCODE_SYNTAX_ERROR), errmsg("'while-do' is only supported in database which dbcompatibility='B'."), parser_errposition(@2)));
(errcode(ERRCODE_SYNTAX_ERROR), errmsg("while-loop syntax is mixed with while-do syntax"), parser_errposition(@2)));
}
PLpgSQL_stmt_while *newp;

View File

@ -2404,7 +2404,7 @@ BEGIN
end loop;
end;
/
ERROR: 'while-do' is only supported in database which dbcompatibility='B'.
ERROR: while-loop syntax is mixed with while-do syntax
LINE 3: while _i < 10 do
^
QUERY: declare _i integer = 0;