管道基础大数据平台系统开发-【后端】-Server
1
13693261870
2022-10-20 39ef214abcb236f30f9ace317af4fdfbe48fd66d
data/db_fn.sql
@@ -2,8 +2,8 @@
show max_connections;
select count(1) from pg_stat_activity;
select c.relname as "tab", cast(obj_description(c.oid) as varchar) as "desc", a.attnum as "num", a.attname as "col",atthasdef,
concat_ws('', t.typname, SUBSTRING(format_type(a.atttypid, a.atttypmod) from '(.*)')) as "type", d.description as "bak"
select c.relname "tab", cast(obj_description(c.oid) as varchar) "desc", a.attnum "num", a.attname "col",
t.typname "type",concat_ws('', t.typname,SUBSTRING(format_type(a.atttypid, a.atttypmod) from '(.*)')) "type2", d.description "bak"
-- select *
from pg_attribute a left join pg_description d on d.objoid = a.attrelid and d.objsubid = a.attnum left join pg_class c 
on a.attrelid = c.oid left join pg_type t on a.atttypid = t.oid where a.attnum >= 0 and reltype>0 and relnamespace in (29257,20582)--135502,69701