!4506 create resource label label_items不能为空

Merge pull request !4506 from 何少渝/label
This commit is contained in:
opengauss_bot
2023-12-06 03:07:47 +00:00
committed by Gitee
3 changed files with 22 additions and 1 deletions

View File

@ -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:

View File

@ -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;

View File

@ -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;