Welcome To openGauss Community
Hey @songfei_sz , 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. You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
Contact Guide
If you have any questions, please contact the SIG: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @libiao2024, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @wofanzheng, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zhangzq131, @zjh_hw .


7.0.0LTSb021版本中已修复


测试类型
SQL功能
测试版本
7.0.0LTS
问题描述
序列的起始值和最小值设定为不同值时,truncate restart后序列未从起始值重新开始
操作系统和硬件信息
Kylin Linux Advanced Server release V10 (Sword)
Linux localhost 4.19.90-24.4.v2101.ky10.aarch64
测试环境
企业版单机
被测功能
SQL功能
预置条件
兼容PG库
操作步骤
`DROP TABLE IF EXISTS r1_t CASCADE;
DROP SEQUENCE IF EXISTS r1_s;
CREATE SEQUENCE r1_s START WITH 100;
CREATE TABLE r1_t(id int DEFAULT nextval('r1_s'), c text);
ALTER SEQUENCE r1_s OWNED BY r1_t.id;
INSERT INTO r1_t(c) VALUES('a'),('b');
SELECT * FROM r1_t;
TRUNCATE r1_t RESTART IDENTITY;
INSERT INTO r1_t(c) VALUES('c');
SELECT * FROM r1_t;`
预期输出
SELECT * FROM r1_t;
id | c
----+---
100 | c
(1 row)
实际输出
SELECT * FROM r1_t;
id | c
----+---
1 | c
(1 row)
日志信息
提单组织
联合伙伴
测试代码