已关闭
[Bug]: ogsql CREATE TABLE 不补 unsigned/auto_increment/text 类型词 #295
wuchenlong创建于  7月27日关闭于  8月27日
wuchenlong
wuchenlong成员
7月27日 创建

测试类型

工具功能

测试版本

7.0.0-LTS

操作系统和硬件信息

openEuler 20.03 aarch64

测试环境

oGRAC双环境

被测功能

ogsql Tab — CREATE TABLE 列定义类型/属性关键字补全

预置条件

oGRAC ONLINE;ogsql / as sysdba;开发提供 补全列表-内核关键字.txt 含 unsigned、auto_increment、text(均为 UNRESERVED_KEYWORD,当前内核扫描跳过)。

操作步骤

SQL> create table t_ct_kw (
# 在列定义处分别输入前缀后 Tab×2:
id int un          -- 期望 unsigned
id int unsigned au -- 期望 auto_increment
remark te          -- 期望 text
col1 text          -- 完整类型名 text 是否可补

预期输出

若产品确认 CREATE TABLE 语境支持类型/属性补全,应出现:
  unsigned / auto_increment / text(或 COL_NAME_KEYWORD 类型词)
而非无动作或仅误补无关系统标识符。

开发词表说明:UNRESERVED 关键字默认不进 ScanKeywords;若需补全应加入 g_sqlCompletionWords 或按 DDL 上下文单独提供。

实际输出

id int unsigned auto_increment not null primary key 语境下:
  un + Tab → 未补全 unsigned(实测可到 uni 等无关前缀)
  auto_increment 需手打完整
  text 类型词未出现在候选中

对照 gsql.md:CREATE TABLE 字段类型位标注为「不支持自动补齐」— ogsql 若有意对齐应写入文档;
若有意增强则应补上述词。

日志信息

用户手工测试 #3。gsql 负向:字段类型位不补(GSQL_NEG_COMPARE #3 BOTH_OK)。请产品确认 ogsql 是否应优于 gsql 补 UNRESERVED 类型词。

提单组织

测试团队

likedislike
wuchenlongwuchenlong成员
7月27日 添加了label:bug
opengauss_bot
opengauss_bot成员
7月27日 评论:

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

likedislike
opengauss_botopengauss_bot成员
7月27日 将 TestManager 设为负责人
opengauss_botopengauss_bot成员
7月27日 添加了label:sig/StorageEngine
opengauss_bot
opengauss_bot成员
7月27日 评论:

Welcome To openGauss Community

Hey @wuchenlong , 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 ,
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: @CityYard, @libiao2024, @lijieac, @theothersideofsea, @wang_bowen, @weithu, @xiong_xjun, @yuanyazhi, @zhangzq131 .

likedislike
wuchenlongwuchenlong成员
7月27日 关联了看板:临时看板
wuchenlongwuchenlong成员
7月27日 修改了issue 的描述
chendong76chendong76成员
8月3日 关联了看板:openGauss 7.0.0-LTS
chendong76chendong76成员
8月3日 移除了看板:临时看板
wuchenlongwuchenlong成员
8月3日 issue优先级由 无优先级 改变为 次要
muyulinzhongmuyulinzhong成员
8月4日 将 leweiyang 设为负责人
muyulinzhongmuyulinzhong成员
8月4日 移除了负责人 TestManager
leweiyangleweiyang成员
8月21日 关联了pull request:完善 SQL 对象上下文、类型及函数补全(#289、#290、#295、#299、#301)
leweiyang
leweiyang成员
8月24日 评论:

已修复

image.png

image.png

likedislike
leweiyangleweiyang成员
8月26日 issue状态由 待办的 改变为 待回归
wuchenlong
wuchenlong成员
8月27日 评论:

回归版本:oGRAC Release 7.0.0-RC3 18ce0a2 build 2026-08-26 09:48:01
回归环境:oGRAC 双节点(20.20.20.104 / 20.20.20.106),db=ONLINE,节点 20.20.20.104 执行
结论:通过(CREATE TABLE 列定义可补 unsigned / auto_increment / text)

回归步骤(ogsql / as sysdba,Linux TTY)

SQL> create table t_ct_kw (id int un<Tab>
SQL> create table t_ct_kw (id int unsigned au<Tab>
SQL> create table t_ct_kw (remark te<Tab>

实际输出
分别命中 unsigned、auto_increment、text。pty 自动化断言通过。

likedislike
wuchenlongwuchenlong成员
8月27日 issue状态由 待回归 改变为 已验收
wuchenlongwuchenlong成员
8月27日 关闭了 issue