Repository navigation
openGauss不能正常显示 表的注释 mysql 是正常的 ,opengauss 有问题 #15268
yongding2026
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
注释数据本身完好存在 openGauss 里,是 DBX 在 openGauss 下取列注释的方式有问题(显示层缺陷),不是数据库的问题。
我在 openGauss 上验证了 information_schema.columns 的完整列清单(44 列)——里面没有任何 comment 字段。
MySQL:information_schema.COLUMNS.COLUMN_COMMENT、TABLES.TABLE_COMMENT 是标准字段,DBX 走 information_schema 就能直接拿到注释 → 正常。
openGauss / PostgreSQL 系:注释存在 pg_description 系统目录里,information_schema 里根本没有这个字段,必须通过 col_description(c.oid, a.attnum) / obj_description(c.oid) 这类函数才能取到。
DBX 对 openGauss 大概率复用了 information_schema 的元数据读取路径(或没有做 pg_catalog 回退),所以列注释拿不到;而表注释走的是 obj_description 路径,所以表注释能显示——和你观察到的现象完全吻合
All reactions