| | |
| | | show max_connections; |
| | | select count(1) from pg_stat_activity; |
| | | |
| | | 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 |
| | | -- 查询表架构和表名 |
| | | select oid,table_catalog,table_schema,table_name |
| | | from information_schema.tables t1, pg_class t2 |
| | | where table_schema = 'bd' and t1."table_name" = t2.relname |
| | | order by table_catalog,table_schema,table_name; |
| | | |
| | | -- 查询字段信息 |
| | | select e.table_catalog, e.table_schema, c.relname "tab", cast(obj_description(c.oid) as varchar) "desc", a.attnum "num", a.attname "col", |
| | | d.typname "type", concat_ws('', d.typname, SUBSTRING(format_type(a.atttypid, a.atttypmod) from '(.*)')) "type2", b.description "bak" |
| | | from pg_attribute a left join pg_description b on b.objoid = a.attrelid and b.objsubid = a.attnum |
| | | left join pg_class c on a.attrelid = c.oid |
| | | left join pg_type d on a.atttypid = d.oid |
| | | left join information_schema.tables e on e.table_name = c.relname |
| | | where a.attnum >= 0 and reltype > 0 and a.attname = 'verid' and d.typname != 'int4' --and relnamespace in (29257,20582) |
| | | 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 pg_constraint inner join pg_class |
| | |
| | | select a.* from lf.sys_menu a, rs b where a.pid=b.id |
| | | ) select * FROM rs order by order_num; -- 查询菜单 |
| | | |
| | | with recursive rs as( |
| | | with recursive rs as ( |
| | | select * from lf.sys_dep where name='中国石油天然气管道工程有限公司' |
| | | union |
| | | select a.* from lf.sys_dep a, rs b where a.pid=b.id |
| | |
| | | select a.*,fn_uname(a.create_user) uname,fn_get_fullname(a.depcode, 1) depName,fn_ver(a.verid) verName,fn_get_fullname(a.dircode, 2) dirName |
| | | from lf.sys_meta a where a.dircode like (select code from lf.sys_dir where name='西气东输四线天然气管道工程(吐鲁番-中卫)(00116DT02)') || '%'; |
| | | |
| | | select * from lf.sys_report order by code |
| | | select * from lf.sys_layer |
| | | select * from lf.sys_meta; |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where code = '01'; |
| | | select * from lf.sys_meta where id = 1420 or metaid = 1420; |
| | | select * from lf.sys_meta order by id desc; |
| | | select a.* from lf.sys_dir a where pid = 0; |
| | | select a.* from lf.sys_dir a where code = '06' order by code; |
| | | |
| | | select a.*, fn_get_fullname(a.code, 2) fullName from lf.sys_dir a where code = '01' |
| | | select count(*) from lf.sys_meta where metaid = 0 |
| | | select * from lf.sys_meta where id = 1420 or metaid = 1420 |
| | | select * from lf.sys_fme_log order by id desc |
| | | select * from lf.sys_fme_log order by id desc; |
| | | select * from bs.m_sitepoint |
| | | select type from lf.sys_dict where field='verid' group by type; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | |
| | | where dircode like '040000%' or dircode like '0100000000%' or dircode like '02000000%' or dircode like '030000%'; |
| | | |
| | | -- 数据申请 |
| | | select * from lf.sys_apply a inner join lf.sys_user b on a.userid = b.id |
| | | select * from lf.sys_apply a |
| | | inner join lf.sys_user b on a.userid = b.id |
| | | inner join lf.sys_dep c on b.depid = c.id; |
| | | |
| | | -- 访问次数 |
| | | select modular1,count(*) from lf.sys_operate group by modular1 order by modular1; |
| | |
| | | /** |
| | | * 权限排除路径:/proxy,要求全部小写 |
| | | */ |
| | | public static String[] EXCLUDE_PATH = new String[]{"/swagger", "/sign/", "/fmeit/", "/perms/", "/floatserver/", "/error", "/wmts/select"}; |
| | | public static String[] EXCLUDE_PATH = new String[]{"/sign/", "/perms/", "/fmeit/", "/crds/", "/floatserver/", "/wmts/select", "/swagger", "/error"}; |
| | | |
| | | /** |
| | | * 数值:2 |