管道基础大数据平台系统开发-【后端】-Server
13693261870
2022-10-20 ff8d6c48e9fa3d4c71b2f8f0edf8235cc590f39d
data/db_fn.sql
@@ -4,9 +4,9 @@
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 *
-- 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 (135502,69701)
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
order by c.relname desc, a.attnum asc;
select pg_constraint.conname as pk_name,pg_attribute.attname as colname,pg_type.typname as typename from