| | |
| | | begin |
| | | update lf.sys_meta set tab = new.pg_ns || '.' || new.tcdm, layer = new.tcmc, rows = new.count where eventid = new.parentid; |
| | | |
| | | if new.count > 0 and position(new.tcdm in 'b_pac_hydrogeology,b_pac_frozensoil,b_pac_geologic_hazard,b_pac_marine_meteorological,b_pac_meteorological,m_equipment_nameplate,m_hydraulic_protection,m_marker,s_explorationpoint,u_sectionline') > 0 then |
| | | select fn_auto_attach(new.id); |
| | | end if; |
| | | |
| | | return new; |
| | | end; |
| | | $$ language plpgsql; |
| | |
| | | return new; |
| | | end; |
| | | $$ language plpgsql; |
| | | ----------------------------------------------------------------------------------------------------- 18.同步附件函数 |
| | | -- drop function fn_auto_attach(integer); |
| | | create or replace function fn_auto_attach(sid integer) returns void as $$ |
| | | declare |
| | | |
| | | ----------------------------------------------------------------------------------------------------- 18.路径分析 |
| | | begin |
| | | select * from lf.sys_fme_log a where a.id = sid limit 1; |
| | | |
| | | --return 0; |
| | | end; |
| | | $$ language plpgsql; |
| | | |
| | | |
| | | |
| | | select fn_auto_attach(143) |
| | | |
| | | |
| | | select position('s_pac_hydrogeology' in 'b_pac_hydrogeology,bd.b_pac_frozensoil,bd.b_pac_geologic_hazard') |
| | | select parentid, pg_ns, tcdm, count from lf.sys_fme_log where id = 143; |
| | | select * from lf.sys_meta where eventid = '1caa28e2-b911-40e1-bfc5-4959a927cdd1'; |
| | | select * from bs.m_marker where parentid = '1caa28e2-b911-40e1-bfc5-4959a927cdd1'; |
| | | |
| | | select * from lf.sys_meta a inner join lf.sys_fme_log b on a.eventid= b.parentid |
| | | |
| | | |
| | | select * from lf.sys_attach; |
| | | insert into lf.sys_attach (name, guid, path, create_user, tab, tab_guid, sizes); |
| | | |
| | | |
| | | ----------------------------------------------------------------------------------------------------- 19.路径分析 |
| | | -- 删除已存在的函数 |
| | | -- drop function pgr_fromAtoB(varchar, double precision, double precision, double precision, double precision); |
| | | |