| | |
| | | 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 |