From c9a6813cc3fc198e5a72d705cabfcb3e324ab51a Mon Sep 17 00:00:00 2001 From: he-shaoyu Date: Mon, 27 Nov 2023 17:11:30 +0800 Subject: [PATCH] =?UTF-8?q?create=20resource=20label=20=E8=AF=AD=E6=B3=95?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/backend/parser/gram.y | 1 - src/test/regress/expected/unsupported_features.out | 12 ++++++++++++ src/test/regress/sql/unsupported_features.sql | 10 ++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/common/backend/parser/gram.y b/src/common/backend/parser/gram.y index abc554592..45abf0fce 100644 --- a/src/common/backend/parser/gram.y +++ b/src/common/backend/parser/gram.y @@ -21819,7 +21819,6 @@ policy_label_name: opt_add_resources_to_label: ADD_P resources_to_label_list { $$ = $2; } - | /* EMPTY */ { $$ = NULL; } ; resources_to_label_list: diff --git a/src/test/regress/expected/unsupported_features.out b/src/test/regress/expected/unsupported_features.out index 31e6b98a4..466e8e767 100644 --- a/src/test/regress/expected/unsupported_features.out +++ b/src/test/regress/expected/unsupported_features.out @@ -177,3 +177,15 @@ drop cascades to table uschema2_ix.associate drop cascades to table uschema2_ix.associate_benefit_expense drop cascades to table uschema2_ix.associate_position drop cascades to table uschema2_ix.position_type +create schema create_resource; +set current_schema='create_resource'; +create table tab(a text); +create resource label name; +ERROR: syntax error at or near ";" +LINE 1: create resource label name; + ^ +alter resource label name add column(tab.a); +ERROR: name no such label found +drop table tab; +reset current_schema; +drop schema create_resource CASCADE; diff --git a/src/test/regress/sql/unsupported_features.sql b/src/test/regress/sql/unsupported_features.sql index 2c78ff8e3..b3e8d8644 100644 --- a/src/test/regress/sql/unsupported_features.sql +++ b/src/test/regress/sql/unsupported_features.sql @@ -103,3 +103,13 @@ select position_type_desc, count(*) from uschema2_ix.position_type group by case when length(position_type_cd)>5 then (length(position_type_desc)-20, length(position_type_cd)+1) else (length(position_type_desc)-10, length(position_type_cd)+2) end, 1; drop schema uschema2_ix cascade; + +create schema create_resource; +set current_schema='create_resource'; +create table tab(a text); +create resource label name; +alter resource label name add column(tab.a); + +drop table tab; +reset current_schema; +drop schema create_resource CASCADE; \ No newline at end of file