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 @liuzhen001 , 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: StorageEngine, AI, CM, CloudNative, SecurityTechnology, SQLEngine ,
and any of the maintainers: @CarrotGo, @chendong76, @chenxiaobin19, @congzhou2603, @dodders, @hwworkholic, @jemappellehc, @muyulinzhong, @quemingjian, @shenzheng4, @shirley_zhengx, @superlchf, @totaj, @wlff234, @ywzq1161327784 ,
and any of the committers: @Igali, @bihua111, @cailei19, @h_ray, @levy53071, @libiao2024, @lihaixiao, @mrzack, @wangfeihuo, @wuyuechuan, @xiong_xjun, @zhangfengzhi123, @zhangxubo, @zjh_hw .


20260805开发自验



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



测试类型
SQL功能
测试版本
7.0.0LTS
问题描述
操作系统和硬件信息
测试环境
企业版主备
被测功能
预置条件
操作步骤
-- @owner: cjl
-- @date: 2025/12/26
-- @testpoint:【sql_variant类型】create table as/like 创建表,合理报错
@connect PrimaryDbDmode;
drop table if exists tab_1130344;
drop table if exists tt_1130344;
drop table if exists like_1130344;
drop table if exists as_1130344;
--建表;
create table tt_1130344(a1 sql_variant PRIMARY KEY);
insert into tt_1130344 values(2::int),('ff'::char(8)),('!'::varchar(3)),('li'::char(6)),('good'::varchar2(8)),('yes'::char);
--建表;
create table tab_1130344
(
a1 sql_variant not null,
a2 sql_variant unique,
a3 sql_variant PRIMARY KEY,
a4 sql_variant default 'good',
a5 sql_variant check(a5 is not null),
a6 sql_variant REFERENCES tt_1130344(a1));
--插入数据;
insert into tab_1130344 values(100::int,10::int,'cc'::varchar(3),'dd'::varchar2(8),'ee'::char,'ff'::char(8));
insert into tab_1130344(a1,a2,a3,a5,a6) values(200::int,40::int,'is'::char(4),'very'::char(4),'good'::varchar(4));
--create table as;
create table as_1130344 as select * from tab_1130344;
--create table like;
create table like_1130344 (like tab_1130344 including all);
--查询;
select count() from tab_1130344;
select count() from as_1130344;
select count(*) from like_1130344;
drop table if exists tab_1130344;
drop table if exists tt_1130344;
drop table if exists like_1130344;
drop table if exists as_1130344;
``
预期输出
实际输出
日志信息
提单组织
测试团队
测试代码