![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
postgresql
文章平均质量分 76
草宝虫
现任某 IT 公司架构师、IT 写作者。精通多门编程语言,主攻 Java 后台开发,十多年项目经验,希望在 IT 领域发挥自己的光辉,给大家做一个启发或者引导。
舰艏行处是长城,能力所达为掌控。
展开
-
鲲鹏920 centos7 postgresql12 postgis2.5.4编译
postgresql12.2编译 依赖环境 这台机器编译过nginx,有一些基础环境 yum install -y gcc-c++ yum install -y pcre pcre-devel yum install -y zlib zlib-devel yum install -y openssl sl-dopenssl-dopenssl-dwopenssl-dopensssl-dopenssl...原创 2020-04-23 15:35:50 · 696 阅读 · 0 评论 -
centos7.1 postgresql10+postgis2.5离线安装
联网环境安装centos7.1,进行下载 wget https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm yum install pgdg-redhat-repo-latest.noarch.rpm -y vi /etc/yum.repos...原创 2020-04-01 14:57:49 · 1518 阅读 · 0 评论 -
postgresql数据库迁移技巧(降低版本迁移到GreenPlum pg11-pg8)
工具:navicat12 步骤: 1.创建scheme 2.导出源scheme的结构sql 3.在目标数据库执行源scheme结构sql中创建序列部分 4.直接操作拷贝scheme所有表(使用生成sql会有版本不兼容的问题,我是从11降到8,跨度比较大) 5.在目标数据库执行源scheme结构sql中更新序列值的部分 完成 ...原创 2020-01-07 12:41:03 · 1619 阅读 · 0 评论 -
centos7 postgresql9和postgis2.1插件编译部署
目录 依赖安装 下载编译libgeos 下载编译proj4 编译Postgresql9 编译PostGIS2 启动postgresql服务 开通外部网络访问 数据库开启PostGIS扩展 查看PostGIS版本 升级PostGIS版本 依赖安装 这个命令里面安装的包可能会多,由于是编译GreenPlum用的,没有尝试最小安装 yum install -y epel-rel...原创 2019-12-13 17:29:51 · 555 阅读 · 0 评论 -
postgresql身份证号校验函数
CREATE OR REPLACE FUNCTION "public"."check_idcard"(a_sfz varchar) RETURNS "pg_catalog"."varchar" AS $BODY$DECLARE v_sfz varchar; v_i integer; v_sum integer; v_array1 integer[]; v_array2 varchar[...原创 2019-09-06 11:15:33 · 2514 阅读 · 0 评论 -
Postgresql时间处理
目录 时间/日期操作符 日期/时间函数 EXTRACT函数 综合示例 时间/日期操作符 操作符 例子 结果 + date '2011-09-28' + integer '7' date '2011-10-05' + date '2011-09-18' + interval '1 hour' timestamp '2011-09-18 0...原创 2019-08-08 12:53:04 · 2103 阅读 · 0 评论 -
python连接postgresql数据库
////////////////////////连接postgresql数据库 pip install psycopg2 ## 导入psycopg2包 import psycopg2 ## 连接到一个给定的数据库 conn = psycopg2.connect(database="postgres", user="postgres", passwo...原创 2019-03-12 11:21:35 · 3826 阅读 · 0 评论 -
PostgreSQL11 data数据库目录迁移
默认的数据库路径是/var/lib/pgsql/11/data 将现有的数据库文件全部拷贝到新的数据库路径下,然后重启 新建一个路径作为新的数据库数据路径,假如是/gdata/pgdata/data mkdir -p /gdata/pgdata/data chown -R postgres:postgres /gdata/pgdata/data chmod 700 /gdata/p...原创 2019-03-08 14:17:37 · 2254 阅读 · 0 评论 -
centos6 postgresql安装
安装 Install the repository RPM: yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-6-x86_64/pgdg-centos11-11-2.noarch.rpm Install the client packages: yum install postgresql11...原创 2018-10-24 13:55:17 · 1412 阅读 · 0 评论 -
centos7 postgresql安装
安装 Install the repository RPM: yum install https://download.postgresql.org/pub/repos/yum/11/redhat/rhel-7-x86_64/pgdg-centos11-11-2.noarch.rpm Install the client packages: yum install postgresq...原创 2018-10-24 13:15:49 · 569 阅读 · 0 评论