From 12fa7b54f40c88bf7578231bfc2e4002d62f319e Mon Sep 17 00:00:00 2001 From: qianxue21 Date: Tue, 30 Aug 2022 13:59:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=BC=E5=AE=B9mysql=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E2=80=9Clabel:=20loop=E2=80=9D=5F1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/pl/plpgsql/src/gram.y | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/pl/plpgsql/src/gram.y b/src/common/pl/plpgsql/src/gram.y index 59d88c53c..e97c398cb 100755 --- a/src/common/pl/plpgsql/src/gram.y +++ b/src/common/pl/plpgsql/src/gram.y @@ -2740,7 +2740,8 @@ stmt_loop : opt_block_label K_LOOP loop_body * support "label: loop" */ if(u_sess->attr.attr_sql.sql_compatibility != B_FORMAT) - yyerror("syntax error"); + ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), + errmsg("'label:' is only supported in database which dbcompatibility='B'."))); PLpgSQL_stmt_loop *newp; newp = (PLpgSQL_stmt_loop *)palloc0(sizeof(PLpgSQL_stmt_loop));