1. PostgreSQL之启动与关闭

    pg的启动 a.切换用户 su – postgres b.启动psotgresql服务 pg_ctl start

    2016/11/03 PostgreSQL

  2. PostgreSQL之匿名块

    参考 sql-do

    2016/11/03 PostgreSQL

  3. PostgreSQL之创建指定表空间的TABLE

    a.建指定用户的表空间 create tablespace test_tbs owner "test_usr" location '/data/pgsqldata/test_tbs';

    2016/11/03 PostgreSQL

  4. PostgreSQL之创建指定表空间数据库

    方案一: a. 创建表空间 ># mkdir -p /data/pgsqldata/test_tbsp ># chown -R postgres:postgres /data/pgsqldata/test_tbsp psql=#create tablespace test_tbsp location '/data/pgsqldata/test_tbsp'; b. 创建用户 create user test with password 'test'; c.创建指定表空间,指定用户的数据库 create database test owner=test tablespace=test_tbsp; d.写函数需要的语言 su - postgres -c"createlang plpgsql saservice" 方案二: a.建用户(linux环境) ># createuser test –s b.建表空间实际存在的文件夹,并给权限(linux环境) ># mkdir /data/pgsqldata/test_tbs ># chown postgres:postgres /data/pgsqldata/test_tbs c.创建表空间(psql环境) DB=# create tablespace test_tbs location '/data/pgsqldata/test_tbs'; d.创建数据库(linux环境) ># createdb test -D test_tbs -O test  

    2016/11/03 PostgreSQL

  5. PostgreSQL之分页查询

    参考 queries-limit

    2016/11/03 PostgreSQL

  6. PostgreSQL之分区表创建以及关系梳理

    分区的操作 实验条件: 存在表tr_g001

    2016/11/03 PostgreSQL

  7. PostgreSQL之zhparser全文索引

    参考 PostgreSQL10实时全文检索和分词,相似搜索,模糊匹配实现类似Google搜索自动提示 这个帖子的方法比较不错,值得试试,被吸引的点如下: CREATE INDEX name_idx ON goods USING GIN(to_tsvector('English',name));

    2016/11/03 PostgreSQL

  8. PostgreSQL之values语法虚拟表

    参考 values-lists

    2016/11/03 PostgreSQL

  9. PostgreSQL之psql连接方式

    参考 psql-connect

    2016/11/03 PostgreSQL

  10. PostgreSQL之psql两大亮点

    参考 psql-tools

    2016/11/03 PostgreSQL