pdm版本:16.6 SP04
使用pdm逆向工程(从postgre数据库逆向生成pdm),生成Table的preview选项卡内容:
drop table od.us_user;
/*==============================================================*/
/* Table: us_user */
/*==============================================================*/
create table od.us_user (
user_id int8 not null,
age int8 not null default 0,
constraint pk_us_user primary key (user_id)
)
without oids;
comment on table od.us_user is
'用户表;
comment on column od.us_user.user_id is
'用户标识;
-- set table ownership
alter table od.us_user owner to od
;
可以看到:
- table的注释,['用户表;]分号前无引号进行关闭。
- colum的注释,['用户标识;]分号前无引号进行关闭。
修改方式:
在 pdm 视图中,Database --> Edit Current DBMS --> Postgre SQL 9.x --> Script --> Objects --> Column --> SqlListQuery。
将[COMMENT]对应的取值[col_description(t.oid, c.attnum)]修改为[col_description(t.oid, c.attnum)||' ']
即连接一个空字符串(脑子抽风想到的,本来想加个引号,结果不行;至今不知道原理)。
table的comment修改方式同理。
参考资料:
Postgresql数据字典的作用
http://www.dataguru.cn/thread-497453-1-1.html
powerdesigner逆向工程生成PDM时的列注释解决方案
http://www.cnblogs.com/downmoon/archive/2011/03/04/1971250.html
powerdesign 逆向工程 注释
https://blog.youkuaiyun.com/linlinv3/article/details/10920643
PowerDesigner生成mysql字段comment 注释
https://www.cnblogs.com/gscq073240/articles/6527259.html
PowerDesigner16逆向工程生成PDM列注释(My Sql5.0模版)
https://www.cnblogs.com/gscq073240/articles/6527230.html
https://www.cnblogs.com/kangxuebin/articles/3688146.html