-- (data_tx_xx_point)表字段-注释SELECT a.attname as"key", col_description(a.attrelid,a.attnum)as"value"FROM pg_class as c, pg_attribute as a, pg_type as t
WHERE c.relname ='data_tx_xx_point'and a.atttypid = t.oid and a.attrelid = c.oid and a.attnum>0-- (data_%_%_line) 表名-表注释select relname as tabname,cast(obj_description(relfilenode,'pg_class')asvarchar)ascommentfrom pg_class c
where relkind ='r'and relname like'data_%_%_line'or relname like'data_%_%_point'and relchecks=0orderby relname
pgsql库信息
--查看数据库select*from pg_database;--查看表空间select*from pg_tablespace;--查看语言select*from pg_language;--查看角色用户select*from pg_user;select*from pg_shadow;select*from pg_roles;--查看会话进程select*from pg_stat_activity;--查看表SELECT*FROM pg_tables where schemaname ='public';--查看表字段select*from information_schema.columnswhere table_schema ='public'and table_name ='pf_vip_org';--查看视图select*from pg_views where schemaname ='public';select*from information_schema.views where table_schema ='public';--查看触发器select*from information_schema.triggers;