1.添加注释
--语法
comment on [type] [target] is [comment]
--为表添加注释
comment on table user is 'The user table';
--为字段注释
comment on column user.userid is 'The user ID';
2.查询注释
--查询字段注释,objsubid为表中字段的序号,从左侧从1开始
select description from pg_description
join pg_class