From db656d0bde3b1685c5014a17cbdbbfbe1c4a3f8f Mon Sep 17 00:00:00 2001 From: qianxue Date: Fri, 13 Oct 2023 02:27:17 -0400 Subject: [PATCH] =?UTF-8?q?while-do=E6=8A=A5=E9=94=99=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E6=9C=89=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/pl/plpgsql/src/gram.y | 2 +- src/test/regress/expected/b_compatibility.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/pl/plpgsql/src/gram.y b/src/common/pl/plpgsql/src/gram.y index 2a798b661..30e72e893 100755 --- a/src/common/pl/plpgsql/src/gram.y +++ b/src/common/pl/plpgsql/src/gram.y @@ -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; diff --git a/src/test/regress/expected/b_compatibility.out b/src/test/regress/expected/b_compatibility.out index e4ec8c110..718045ebd 100644 --- a/src/test/regress/expected/b_compatibility.out +++ b/src/test/regress/expected/b_compatibility.out @@ -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;