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;