总结一:查看表结构(字段)信息:
注释:其中dd为schema名字,department为表名*
Select table_name,column_name,data_type,character_maximum_length from information.columns where table_schema='dd' and table_name='department';
二:查看字段注释信息:
Select a.attnum,(select description from pg_catalog.pg_description where objoID=a.attrelID and obJsubID=a.attnum) as descript,a.attname,pg_catalog.format_type(a.atttypID,a.atttypmod) as data_type from pg_catalog.pg_attribute a where 1=1 and a.attrelID=(select oID from pg_class where relname='department' ) and a.attnum>0 and not a.attisdropped order by a.attnum;
以上是内存溢出为你收集整理的Postgresql查看表结构和字段注释全部内容,希望文章能够帮你解决Postgresql查看表结构和字段注释所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)