| | |
| | | select * from lf.sys_publish order by id desc; |
| | | select * from lf.sys_download order by id desc limit 20; --downid |
| | | select * from lf.sys_apply order by id desc; |
| | | |
| | | select * from lf.sys_flow order by id desc; |
| | | select case a.userid when 2 then guid else null end "guid", a.* from lf.sys_apply a order by id desc |
| | | |
| | | select c.relname "tab", cast(obj_description(c.oid) as varchar) "desc", a.attnum "num", |
| | | a.attname "col", t.typname "type", d.description "bak" 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 (5424908) and c.relname='pl_pipelinepoint_f' and position('pg.dropped' in a.attname) = 0 |
| | | order by c.relname desc, a.attnum asc |
| | | |
| | | select * from bs.s_explorationpointstratum where exppointid in ('HJXK20') |
| | | |
| | | |
| | | |
| | |
| | | |
| | | |
| | | |
| | | ---------------------------------------------------------------------------------------------- SY1.煤层54表 |
| | | -- drop table public.coal54; |
| | | create table if not exists public.coal54 ( |
| | | gid serial primary key, |
| | | top numeric(12,3), |
| | | bottom numeric(12,3), |
| | | clong numeric(12,3), |
| | | width numeric(12,3), |
| | | height numeric(12,3), |
| | | ctype varchar(8), |
| | | density numeric(12,3), |
| | | gangue numeric(12,5), |
| | | volume numeric(12,3), |
| | | geom geometry(point, 2435) |
| | | ); |
| | | create index idx_coal54_geom on public.coal54 using gist (geom); |
| | | comment on table public.coal54 is '煤层54表'; |
| | | comment on column public.coal54.gid is '主键ID'; |
| | | comment on column public.coal54.top is '上顶高度'; |
| | | comment on column public.coal54.bottom is '下底高度'; |
| | | comment on column public.coal54.clong is '长度'; |
| | | comment on column public.coal54.width is '宽度'; |
| | | comment on column public.coal54.height is '高度'; |
| | | comment on column public.coal54.ctype is '类别'; |
| | | comment on column public.coal54.density is '视密度'; |
| | | comment on column public.coal54.gangue is '含矸率'; |
| | | comment on column public.coal54.volume is '体积'; |
| | | comment on column public.coal54.geom is '空间'; |
| | | |
| | | select * from public.coal54 order by gid desc limit 100; |
| | | ---------------------------------------------------------------------------------------------- SY2.煤层2000表 |
| | | -- drop table public.coal2000; |
| | | create table if not exists public.coal2000 ( |
| | | gid serial primary key, |
| | | top numeric(12,3), |
| | | bottom numeric(12,3), |
| | | clong numeric(12,3), |
| | | width numeric(12,3), |
| | | height numeric(12,3), |
| | | ctype varchar(8), |
| | | density numeric(12,3), |
| | | gangue numeric(12,5), |
| | | volume numeric(12,3), |
| | | geom geometry(point, 4490) |
| | | ); |
| | | create index idx_coal2000_geom on public.coal2000 using gist (geom); |
| | | comment on table public.coal2000 is '煤层54表'; |
| | | comment on column public.coal2000.gid is '主键ID'; |
| | | comment on column public.coal2000.top is '上顶高度'; |
| | | comment on column public.coal2000.bottom is '下底高度'; |
| | | comment on column public.coal2000.clong is '长度'; |
| | | comment on column public.coal2000.width is '宽度'; |
| | | comment on column public.coal2000.height is '高度'; |
| | | comment on column public.coal2000.ctype is '类别'; |
| | | comment on column public.coal2000.density is '视密度'; |
| | | comment on column public.coal2000.gangue is '含矸率'; |
| | | comment on column public.coal2000.volume is '体积'; |
| | | comment on column public.coal2000.geom is '空间'; |
| | | |
| | | |
| | | |
| | | select * from public.coal2000 order by gid desc limit 100; |
| | | ---------------------------------------------------------------------------------------------- -1.更新钻孔 |
| | | select count(*) from bd.b_borehole; -- 357824 |
| | | select count(*) from lf.sys_attach; -- 357880 = 56 + 357824 |
| | |
| | | bak varchar(1024), |
| | | geom geometry(MultiPolygon, 4490) |
| | | ); |
| | | -- drop index index_sys_meta_geom; |
| | | -- drop index lf.index_sys_meta_geom; |
| | | create index index_sys_meta_geom on lf.sys_meta using GIST (geom); |
| | | comment on table lf.sys_meta is '元数据表'; |
| | | comment on column lf.sys_meta.id is '主键ID'; |
| | |
| | | create_time timestamp(6) without time zone default now(), |
| | | download_user integer, |
| | | download_time timestamp(6) without time zone, |
| | | geom geometry default null, |
| | | geom geometry(MultiPolygon, 4490), |
| | | bak varchar(1024) |
| | | CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2), |
| | | CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POLYGON'::text OR geom IS NULL), |
| | | CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 4490) |
| | | --geom geometry default null, |
| | | --CONSTRAINT enforce_dims_geom CHECK (st_ndims(geom) = 2), |
| | | --CONSTRAINT enforce_geotype_geom CHECK (geometrytype(geom) = 'POLYGON'::text OR geom IS NULL), |
| | | --CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 4490) |
| | | ); |
| | | -- drop index if exists lf.index_sys_download_geom; |
| | | create index index_sys_download_geom on lf.sys_download using gist (geom); |
| | | comment on table lf.sys_download is '下载表'; |
| | | comment on column lf.sys_download.id is '主键ID'; |
| | |
| | | create_time timestamp(6) without time zone default now(), |
| | | update_user integer, |
| | | update_time timestamp(6) without time zone, |
| | | geom geometry(PointZ,4490), |
| | | geom geometry(PointZ, 4490), |
| | | bak varchar(1024) |
| | | ); |
| | | -- drop index if exists lf.idx_sys_publish_geom; |
| | |
| | | comment on column lf.sys_publish.update_user is '更新人ID'; |
| | | comment on column lf.sys_publish.update_time is '更新时间'; |
| | | comment on column lf.sys_publish.bak is '备注'; |
| | | comment on column lf.sys_publish.geom is '空间位置'; |
| | | -- alter table lf.sys_publish add column regid varchar(40); |
| | | -- insert into lf.sys_publish (name,geom) values ('Test',ST_GeomFromText('POINT Z (101.9281 36.58675 2199.5)')); |
| | | |