![](https://img-blog.csdnimg.cn/20190918140129601.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
postgresql
文章平均质量分 90
postgresql
keepstudy_yangzh
这个作者很懒,什么都没留下…
展开
-
sql 通用查询条件组织及对象转sql语句
sql 通用查询条件组织前后台约定通用查询条件。原创 2022-12-23 13:58:23 · 1146 阅读 · 1 评论 -
postgres fdw
本文参考:http://postgres.cn/docs/11/postgres-fdw.html介绍:postgres_fdw 模块提供了外部数据包装器postgres_fdw,它可以被用来访问存储在外部PostgreSQL服务器中的数据。解决问题:不同数据库间的数据查询交互问题。安装:Postgres 源码安装包中存在此插件。可以找到cd ${postgres}/contrib/postgres_fdwmake && make install安装完成后,在数据库查询select * from pg_原创 2022-06-01 10:45:09 · 432 阅读 · 0 评论 -
pgpool-II的安装及配置读写分离的高可用pg集群
pgpool-II的安装及配置1.源码安装pgpool-II2.postgresql 配置流同步2.1 安装postgresql。2.2 配置启动备份机器2.3 配置修改及开启流同步3.pgpool-II的配值及启动3.1.pgpool-II的相关配置3.1.1 pgpool.conf3.2启动与关闭1.源码安装pgpool-IItar -xvf pgpool-II-4.2.2.tar.gzcd pgpool-II-4.2.2./configure --prefix=/usr/package/pg原创 2021-05-21 10:37:13 · 2995 阅读 · 0 评论 -
pgsql+postgis 实时返回mvt(Mapbox Vector Tiles) 矢量瓦片。
pgsql+postgis 实时返回mvt(Mapbox Vector Tiles) 切片。xmin,ymin,xmax,ymax 为瓦片范围坐标,下面有x,y,z转换为瓦片空间范围方法。SELECT ST_AsMVT ( fmvt, 'pointLayer', 4096, 'geom' ) as "mvt" FROM (SELECT dwmc, ST_AsMVTGeom (ST_Transform ( st_simplify (dgeom,${tolerance},true), 3395)原创 2020-08-22 10:04:15 · 4436 阅读 · 0 评论 -
linux下 postgresql 安装 postgis 拓展
1.方式1,二进制包安装postgis获取postgis拓展安装包wget https://download.osgeo.org/postgis/source/postgis-2.5.4.tar.gztar -xvf postgis-2.5.4.tar.gz配置安装参数// with-pgconfig 为postgresl安装路径下的./configure --with-pgconfig=/usr/pgsql-11/bin/pg_config如果报错configure: error: t原创 2020-11-18 15:25:17 · 1210 阅读 · 0 评论 -
postgresql 获取表的字段及创建表、添加、删除、编辑字段语句
添加字段ALTER TABLE data_u11001000504 ADD COLUMN filedtest1 INTEGER字段类型可以为:INTEGER、int4 int8、 varchar(11)编辑字段(1)修改字段类型ALTER TABLE data_u11001000504 ALTER COLUMN varch TYPE int4 USING(varch::int...原创 2020-04-24 20:25:57 · 13313 阅读 · 1 评论 -
pgsql 常用查询汇总(查询数据表字段)
查询数据库表中字段及类型SELECT table_catalog,table_schema,table_name,column_name,ordinal_position,is_nullable,data_type,character_maximum_length,numeric_precision,udt_name FROM information_schema.columns As ...原创 2020-04-14 20:41:51 · 26275 阅读 · 1 评论 -
PostGIS创建空间数据库
1.首先安装PostgreSQL2.PostgreSQL安装成功后,安装PostGIS。3.创建数据库 创建数据库后不能使用空间函数 空间函数测试:select st_geomfromtext(('POINT(114 32)'),4326) as geomselect st_geomfromtex...原创 2020-03-26 13:20:43 · 680 阅读 · 0 评论