【开源数据库PostgreSQL8.4.2发布】教程文章相关的互联网学习教程文章

MySQL、PostgreSQL、Ingres r3、MaxDB等开源数据库的详细比较

1.MySQL 5 作为当今最流行的开放源码数据库之一,MySQL数据库为用户提供了一个相对简单的 解决方案,适用于广泛的应用程序部署,能够降低用户的TCO。MySQL是一个多线程、结构化查询语言(SQL)数据库服务器。MySQL的执行性能高, 运行速度快,容易使用。 MySQL包括以下几个关键优势: ◆ 可靠的性能和服务MySQL向公众提供所有数据库服务器软件的早期版本,都是利用开放源码进行为期几个月的测试之后才发布作为生产之用。 ◆ 易于使用...

Measuring PostgreSQL Checkpoint Statistics【代码】

The problem with checkpoints is that they can be very intensive, because to complete one requires writing every single bit of changed data in the database’s buffer cache out to disk. There were a number of features added to PostgreSQL 8.3 that allow you to better monitor the checkpoint overhead, and to lower it by spreading the activity over a longer period of time. I wrote a long article about t...

thinkphp 连接postgresql

OR REPLACE FUNCTION pgsql_type(a_type varchar) RETURNS varchar AS $BODY$ DECLAREv_type varchar; BEGINIF a_type=‘int8‘ THENv_type:=‘bigint‘;ELSIF a_type=‘int4‘ THENv_type:=‘integer‘;ELSIF a_type=‘int2‘ THENv_type:=‘smallint‘;ELSIF a_type=‘bpchar‘ THENv_type:=‘char‘;ELSEv_type:=a_type;END IF;RETURN v_type; END; $BODY$ LANGUAGE PLPGSQL;CREATE TYPE "public"."tablestruct" AS ("fields_ke...

postgresql【代码】

Allow the possibility for account msf_user to use password based authentication to connect to databasse msf_user. Edit "/var/lib/pgsql/data/pg_hba.conf", change: host all all 127.0.0.1/32 identto host "msf_database" "msf_user" 127.0.0.1/32 md5 host all all 127.0.0.1/32 identSee also: Postgresql Wiki: Client Aut...

关于odoo、postgresql中sql 的取空值的写法

使用 p =‘(NULL)‘,就可以给sql语句传空值了,我试过了,好使哦!本文出自 “时空旅行者” 博客,请务必保留此出处http://siweilai.blog.51cto.com/9233507/1734345关于odoo、postgresql中sql 的取空值的写法标签:odoo sql postgresql 空值 本文系统来源:http://siweilai.blog.51cto.com/9233507/1734345

PostgreSQL Monitor pg_view【图】

PostgreSQL Monitor pg_view https://github.com/zalando/pg_view RequirementsLinux 2.6, python 2.6, psycopg2, curses 查看系统是否有curses [root@node3 /]# ls /usr/include/ncurses* /usr/include/ncurses_dll.h /usr/include/ncurses.h 系统已经安装了curses,如果没有下载安装curses 下载安装 curses curses 的GNU实现 ncurses,官网下载地址:http://ftp.gnu.org/gnu/ncurses/ 下载 ncurses 的最新版本; [root@node3 so...

PostgreSQL的 Slony-I 数据同步【代码】

;个人感觉总结的很好! 下面是为slony维护;定制的脚本 包括了服务启动/关闭;以及slony set删除/安装。#!/bin/shSLONIK=/opt/pgsql/bin/slonik SLON=/opt/pgsql/bin/slon CLUSTER_NAME=lottu_cluster MASTERDBNAME=masterdb SLAVEDBNAME=slavedb MASTERHOST=192.168.8.121 SLAVEHOST=192.168.8.120 REPLICATIONUSER=postgres PASSWORD=li0924uninstall() {$SLONIK << _EOF_ cluster name = $CLUSTER_NAME;node 1 admin conninf...

PostgreSQL: 一种用于生成随机字符串的方法

returns text as$body$ select array_to_string(array(select substring(‘0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz‘ FROM (ceil(random()*62))::int FOR 1) FROM generate_series(1, $1)), ‘‘);$body$language sql volatile; 来自为知笔记(Wiz)PostgreSQL: 一种用于生成随机字符串的方法标签:本文系统来源:http://www.cnblogs.com/strinkbug/p/5141047.html

PostgreSQL系列一:PostgreSQL简介与安装【代码】【图】

1.1 PostgreSQL概述 PostgreSQL数据库是目前功能最强大的开源数据库,支持丰富的数据类型(如JSON和JSONB类型、数组类型)和自定义类型。而且它提供了丰富的接口,可以很容易地扩展它的功能,如可以在GiST框架下实现自己的索引类型等,它还支持使用C语言写自定义函数、触发器,也支持使用流行的语言写自定义函数,比如其中的PL/Perl提供了使用Perl语言写自定义函数的功能,当然还有PL/Python、PL/Tcl,等等。 1.2 ...

postgresql 关闭自动提交

我们知道oracle中sqlplus里面执行dml语句;是需要提交commit;若错了;也可以回滚rollback; 然而在postgresql里面默认是自动提交;执行完就马上提交了,不能回滚,这样容易导致误操作的发生,有没有什么办法避免这个风险呢?当然有,在psql中默认是打开自动提交的,我们可以关闭自动提交。 2. 操作验证 [postgres@oracle2 ~]$ psql -U lottu -d xzfbpsql (9.5.0)Type "help" for help. xzfb=> create table lottu01(id int);CR...

postgresql - 事务

;//开启关闭自动提交的事务 insert into testtab01 values(0); rollback;//事务回滚 2、SavePoint的使用 begin;//开启关闭自动提交的事务 insert into testtab01 values(0); savepoint first_savepoint;//创建事务保存点 insert into testtab02 values(1); rollback;//事务回滚 insert into testtab02 values(1); commit;//事务提交 postgresql - 事务标签:本文系统来源:http://www.cnblogs.com/xiaofoyuan/p/5285575.html

PostgreSQL 基于Docker的多实例安装【代码】

apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609Dsudo touch /etc/apt/sources.list.d/docker.listsudo vim /etc/apt/sources.list.d/docker.list 根据系统写入: deb https://apt.dockerproject.org/repo debian-jessie main 安装 sudo apt-get updatesudo apt-get install docker-engine 开启服务 sudo service docker start 验证 sudo docker run hello-wo...

Streaming replication slots in PostgreSQL 9.4

restore_command to give the replica access to the archive, or be willing to re-create a standby that falls behind. A less reliable alternative is to set wal_keep_segments to a “high enough” value to ensure that the replica never falls too far behind – but there’s no real way to guess what is high enough, and the higher the value is set the greater the risk the master will be able to run out of...

From Disk partition to PostgreSQLinstallation

[root@compute mnt]# fdisk /dev/sdb Welcome to fdisk (util-linux 2.23.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): n Partition type: p primary (0 primary, 0 extended, 4 free) e extended Select (default p): Using default response p Partition number (1-4, default 1): First sector (2048-1953525167, de...

Linux下的PostgreSQL简单安装手册【代码】

linux版本: CentOS release 6.2 (Final) pg版本 : postgresql-9.5.0 2. pg数据库下载地址 --http://www.postgresql.org/ftp/source/ 3. 安装依赖包 >yum install gcc* >yum install readline-devel* 4. 安装postgres 1). 解压压缩包 [root@oracle2 software]# tar jxvf postgresql-9.5.0.tar.bz2 2). 进入postgresql-9.5.0文件夹 [root@oracle2 software]# cd postgresql-9.5.0 [root@oracle2 postgresql-9.5...

POSTGRESQL - 相关标签