
PostgreSQL
实战
aganliang
不能记录一下吗
展开
-
QGIS把矢量图层分割为N个图层
1原创 2022-06-01 21:56:49 · 2973 阅读 · 1 评论 -
windows 10 安装postgresql-14.2-2
下载:Download PostgreSQL如果选择中文,安装最后容易出现问题原创 2022-04-24 23:01:11 · 2232 阅读 · 0 评论 -
PL/pgSQL 基本使用语法
参考官网介绍:PL/pgSQL is a loadable procedural language for the PostgreSQL database system. The design goals of PL/pgSQL were to create a loadable procedural language thatcan be used to create functions, procedures, and triggers,adds control structures t原创 2021-11-28 22:30:44 · 865 阅读 · 0 评论 -
日期、时间与时间戳的转换
处理时空数据总是遇到时间、日期与时间戳的转换,下面记录一下相关的工具。参考相关工具:https://tool.lu/timestamp/1.excel表中日期、时间与时间戳的转换:# excel 表的日期、时间字段自定义格式是:yyyy-m-d h:mm:ss# 日期、时间转为时间戳B2=(A2-70*365-19)*86400-8*3600# 时间戳转为日期、时间A6=(B6+8*3600)/86400+70*365+19...原创 2021-07-08 22:18:23 · 372 阅读 · 0 评论 -
PostGIS 函数
1.ST_MakeEnvelope— Creates a rectangular Polygon from minimum and maximum coordinates.geometry ST_MakeEnvelope(float xmin, float ymin, float xmax, float ymax, integer srid=unknown);Creates a rectangular Polygon from the minimum and maximum values for.原创 2021-06-15 23:16:42 · 1075 阅读 · 0 评论 -
restfull api神器 postgrest简单使用
参考github:https://github.com/PostgREST/postgrest使用参考:http://postgrest.org/en/v7.0.0/api.html#安装和部署二进制版本前台运行:./postgrest db.conf后台运行:nohup ./postgrest db.conf &ps -ef | grep postgrestkill -9 pidendpointmyip:3000/myip:3000/yw_110jqmyi原创 2020-11-30 16:34:02 · 566 阅读 · 0 评论 -
PostGIS 计算长度和面积
参考官网:http://postgis.net/docs/manual-3.0/using_postgis_dbmanagement.htmlThe basis for the PostGIS geometry type is a plane. The shortest path between two points on the plane is a straight line. That means calculations on geometries (areas, distances.原创 2020-11-15 22:15:29 · 6343 阅读 · 0 评论 -
GDAL ,PROJ,GEOS,PROTOBUF安装
GDAL源码 gdal-3.0.2.tar.gz 下载:https://gdal.org/download.html#current-releases依赖于PROJ61.proj6安装下载源码 proj-6.2.1.tar.gztar and cdmkdir buildcd build/cmake .. #如果要在内网部署,就把这个文件夹复制到...原创 2019-12-04 22:16:28 · 10968 阅读 · 1 评论 -
GeoServer 简单介绍
官网:http://geoserver.org/1.相关历史GeoServer was started in 2001 by The Open Planning Project (TOPP), a non-profit technology incubator based in New York.基本核心工具:Those involved with GeoServer founded the GeoTools project, an open source GIS Java toolkit. .原创 2020-07-19 13:28:43 · 1046 阅读 · 0 评论 -
osm2pgsql 工具安装和使用
OSM数据的介绍:OpenStreetMap数据下载和使用osm2pgsql 工具:https://github.com/openstreetmap/osm2pgsqlpostgresql安装:PostgreSQL在centos7的安装和手动安装扩展从github下载其源代码.tar.gz安装依赖:sudo yum install cmake make gcc-c++ boost-devel expat-devel zlib-devel \ bzip2-devel post..原创 2020-06-16 23:52:45 · 3304 阅读 · 0 评论 -
KONG 安装部署
官网:Documentation for Kong参考:CentOS Installationyum install kong-2.0.2.el7.amd64.rpmsu - postgrespg_ctl start psqlCREATE USER kong; CREATE DATABASE kong OWNER kong;---CREATE ROLE---C...原创 2020-03-29 22:35:01 · 1655 阅读 · 0 评论 -
docker 安装postgres 和使用
docker network create kong-netdocker run --name kong-database --network=kong-net -p 5430:5432 -e "POSTGRES_USER=kong" -e "POSTGRES_DB=kong" -e"POSTGRES_PASSWORD=kong" postgres:9.6# 查找post...原创 2020-03-29 11:34:33 · 907 阅读 · 0 评论 -
Centos 7 开机启动PostgrepSQL 配置
参考:Centos 开机启动Openresty之中的NginxPostgrepSQL是通过源码编译安装,所以没有postgrepsql.service文件(通过yum install命令安装就有这个文件)。为了实现Centos7开机自动启动postgresql,需要在/usr/lib/systemd/system目录下,创建postgresql.service文件[Unit]...原创 2020-03-24 12:53:02 · 484 阅读 · 0 评论 -
GEE 自带postgresql维护
数据和日志目录:/var/opt/google/pgsql/data or /logs pg_hba.conf和postgresql.conf文件在 data目录下pg的运行目录: /opt/google/bin/ 主要命令都在这里如 pg_ctl start | stop | restart | reload 等等运行上面的命令不能是r...原创 2020-01-06 08:51:03 · 404 阅读 · 0 评论 -
postGIS基本使用(二)
1.查询select * from d_mlp t limit 20;select ST_AsText(geom) from d_mlp t limit 20;# 每一条记录都有一个sridselect st_srid(geom) from d_mlp;select 'srid=4;point(0 0)'::geometry;select * from geog...原创 2019-12-23 12:35:49 · 1497 阅读 · 0 评论 -
postgresql相关概念
1.模式一个PostgreSQL数据库集群包含一个或多个已命名数据库。一个数据库包含一个或多个已命名的模式,模式又包含表。模式还可以包含其它对象,包括数据类型、函数、操作符等。同一个对象名可以在不同的模式里使用而不会导致冲突;比如,schema1和myschema都可以包含一个名为mytable的表。database.schema.table缺省时,创建表(以及其它对象)都自动放到...原创 2019-12-02 11:46:47 · 291 阅读 · 0 评论 -
pgAdmin连接postgresql
pgAdmin官网下载:https://www.pgadmin.org/download/postgresql默认是不启动远程连接的,需要对这两个文件进行配置:/pgs/usr/local/pgsql/data/-------pg_hba_conf和postgresql.conf进行配置调整:# pg_hba_conf:# 添加这个host all all 0.0.0.0/0 ...原创 2019-11-22 14:31:51 · 1971 阅读 · 0 评论 -
PostGIS基本使用(一)
安装教程:PostGIS安装下面继续记录在centos7服务器的使用记录。官方简易教程:http://postgis.net/install/官方详细教程:http://postgis.net/docs/manual-3.0/-- Create table with spatial columnCREATE TABLE mytable ( id SERIAL PR...原创 2019-11-21 16:38:15 · 1180 阅读 · 0 评论 -
PostGIS安装---基于centos7
PostGIS相关介绍:PostGIS教程一:PostGIS介绍PostGIS下载和安装指南:http://www.postgis.net/source/需要安装依赖:postgresql-develorpostgresql-dev,geos, proj,gdal,gdal-devel,libxml2 and json-c,json-c-devel输入 gdalinfo可以查看...原创 2019-11-20 21:16:26 · 711 阅读 · 0 评论 -
Postgresql数据库管理
在安装pgs的服务器,直接输入psql进入控制台,在控制台中完成Postgrepsql数据库管理工作。默认情况下 PostgreSQL 安装完成后,自带了一个命令行工具SQL Shell(psql),这个就是控制台。# psg的启动,关闭等等postgresql {start|stop|restart|reload|status}重启之后,su -u postgres...原创 2019-11-02 17:26:23 · 1612 阅读 · 0 评论 -
PostgreSQL在centos7的安装和手动安装扩展
官网下载源代码:https://www.postgresql.org/ftp/source/v12.0/mkdir /pgs把源代码 postgresql-12.0.tar.gz 放到/pgs 目录下cd /pgstar -vxzf postgresql-12.0.tar.gz解压后,有install说明文档1.安装相关依赖yum install -y ...原创 2019-10-11 22:11:56 · 922 阅读 · 0 评论