-- 表索引select * from pg_indexes where tablename=‘person_wechat_label‘;select * from pg_statio_all_indexes where relname=‘person_wechat_label‘;-- 所有表SELECT * FROM pg_tables;-- 所有视图SELECT * FROM pg_views;-- 表结构SELECT a.attnum,a.attname AS field,t.typname AS type,a.attlen AS length,a.atttypmod AS lengthvar,a.attnotnull AS notnull,b.description AS comment FROM pg_class c,pg_attribute a LEFT OUTER JOIN pg_description b ON a.attrelid=b.objoid AND a.attnum = b.objsubid,pg_type t WHERE c.relname = ‘person_wechat_label‘ and a.attnum > 0 and a.attrelid = c.oid and a.atttypid = t.oid ORDER BY a.attnum; 参数设置:https://yq.aliyun.com/articles/697710从数据库中导出数据到文件:\copy (select * from "user") to ‘/tmp/1.txt‘;
原文地址:https://www.cnblogs.com/smallleiit/p/11684674.html
时间: 2024-11-11 03:03:56