摘自:http://www.cnblogs.com/yjf512/p/4402096.html postgres中的视图在查询的时候进行扫描子表的操作,而物化视图则是实实在在地将数据存成一张表。物化视图是在9.3 之后才有的东西。 创建一个视图 CREATE OR REPLACE VIEW stud ...
分类:
数据库 时间:
2016-04-09 19:01:48
阅读次数:
206
一、数据库升级9.4到9.51.pg_dump导入导出(数据量不大时使用)postgres用户登录$pg_dumpall>db_export.out$env|grepLANGLANG=en_US.UTF-8如果数据库字符集为en_US.UTF-8,系统字符集为zh_CN.UTF-8导入步骤为postgres用户登录$exportLANG=en_US.UTF-8$psql-fdb_export.outpo..
分类:
数据库 时间:
2016-04-09 17:06:54
阅读次数:
255
Searching in a Radius using Postgres Creating a GEO application has never been easier. You can have a fully working "What's close to me" in a matter o ...
分类:
其他好文 时间:
2016-04-06 12:58:11
阅读次数:
235
一个密码文件包含了我们需要连接的五个字段,所以我们可以使用文件权限来使密码更安全。 host:port:dbname:user:password such as myhost:5432:postgres:sriggs:moresecure 密码文件是使用一个叫PGPASSFILE的环境变量来设置的。 ...
分类:
数据库 时间:
2016-04-04 09:11:04
阅读次数:
466
今天初试开源的PostgreSQL... 这个是PostgreSQL官网,可以下载相应的版本 http://www.postgresql.org/ 这里有一个 PostgreSQL 9.3.1 中文手册 http://www.postgres.cn/docs/9.3/index.html Postg ...
分类:
数据库 时间:
2016-04-03 01:37:04
阅读次数:
210
导出整个库:pg_dump -h localhost -U postgres -p 5432 qsdb>e:\qsdb1.dmp 导出指定模式:pg_dump -h localhost -U postgres -p 5432 --schema=dgbt qsdb>e:\qsdb1.dmp 导入:ps ...
分类:
数据库 时间:
2016-04-02 18:50:22
阅读次数:
164
进入数据库: $sudo -u postgres psql 查看所有的数据库 $\l 切换数据库 $\c 列数据表 $\dt 数据表结构: $\d tblname http://blog.csdn.net/nameoccupied/article/details/9145345 http://blo ...
分类:
数据库 时间:
2016-03-26 23:55:15
阅读次数:
336
最简单的方式是安装Postgres.App. 这个应用里自带了最新版本的PostgreSQL而且不需要学习数据库服务器启动和关闭的命令。程序安好后(别忘了拖拽到Application的文件夹里),会自动在端口5432开启一个PostgreSQL的服务器。在程序界面里还有一个很贴心的按钮 'Open
分类:
数据库 时间:
2016-03-23 19:59:35
阅读次数:
202
前提:1、请确定postgresql可以访问(远程),postgres用户密码是否修改,否则pgpool无法验证通过2、安装必要的安装包,pgxs,apt-getinstallpostgresql-server-dev-9.5,否则会报pgxs的错误参考:中文(还好蛮新):http://pgpool.projects.pgfoundry.org/pgpool-II/doc/pgpoo..
分类:
数据库 时间:
2016-03-16 02:01:15
阅读次数:
356
This is the third of a series of posts based on a presentation I did at the Barcelona Ruby Conference called “20,000 Leagues Under ActiveRecord.” (pos