This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.


Welcome To openGauss Community
Hey @ywzq1161327784 , thanks for your contribution to the community.
Bot Usage Manual
I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.
Contact Guide
If you have any questions, please contact the SIG: Plugin ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @dreamalloc, @huyinghao, @libiao2024, @wangfeihuo, @wmy_ld, @wuyuechuan, @xiong_xjun, @zhangxubo, @zhaojunv3z810 .


This issue requires an assignee. Since you haven't specified one, we've assigned TestManager as the default assignee for this issue.


20260826自验ok
testb=# create table t1(f1 int, f2 text, f3 int, f4 bigint, f5 int generated always as (f1 + f3) stored);
CREATE TABLE
testb=# insert into t1 values(1, 'aaa', 3, 1);
INSERT 0 1
testb=# insert into t1 values(11, 'bbb', 33, 2);
INSERT 0 1
testb=# insert into t1 values(111, 'ccc', 333, 3);
INSERT 0 1
testb=# insert into t1 values(1111, 'ddd', 3333, 4);
INSERT 0 1
testb=# select * from t1;
f1 | f2 | f3 | f4 | f5
------+-----+------+----+------
1 | aaa | 3 | 1 | 4
11 | bbb | 33 | 2 | 44
111 | ccc | 333 | 3 | 444
1111 | ddd | 3333 | 4 | 4444
(4 rows)
testb=#
testb=# create view t1_view1 as select * from t1;
CREATE VIEW
testb=# \d+ t1_view1;
View "public.t1_view1"
Column | Type | Modifiers | Stora
ge | Description
--------+---------+-----------------------------------------------+------
----+-------------
f1 | integer | | plain
|
f2 | text | character set UTF8 collate utf8mb4_general_ci | exten
ded |
f3 | integer | | plain
|
f4 | bigint | | plain
|
f5 | integer | | plain
|
View definition:
SELECT *
FROM t1;
testb=# select * from t1_view1;
f1 | f2 | f3 | f4 | f5
------+-----+------+----+------
1 | aaa | 3 | 1 | 4
11 | bbb | 33 | 2 | 44
111 | ccc | 333 | 3 | 444
1111 | ddd | 3333 | 4 | 4444
(4 rows)
testb=# alter table t1 drop f4;
ALTER TABLE
testb=# alter table t1 add f8 int first, drop f2;
ALTER TABLE
testb=# alter table t1 drop f5;
ALTER TABLE
testb=# alter table t1 add f9 int after f1, drop f2;
ERROR: column "f2" of relation "t1" does not exist


回归版本:7.0.0 LTS B020
回归结论:通过
回归过程:



测试类型
SQL功能
测试版本
7.0.0LTS
问题描述
alter table执行报错
操作系统和硬件信息
不限
测试环境
企业版单机
被测功能
alter table操作
预置条件
无
操作步骤
预期输出
执行成功
实际输出
部分sql执行报错,删除f4之后后续add列报错

日志信息
见实际输出
提单组织
内部开发
测试代码