Home
|
简体中文
|
繁体中文
|
杂文
|
Github
|
知乎专栏
|
Facebook
|
Linkedin
|
Youtube
|
打赏(Donations)
|
About
部分 VI. PostgreSQL
上一页
下一页
知乎专栏
部分 VI. PostgreSQL
目录
59. PostgreSQL 安装
59.1. Ubuntu 12.04.1 LTS 安装
59.2. YUM 默认源安装
59.3. PostgreSQL 官方 YUM 源安装
59.3.1. 9.2
59.3.2. 9.3
59.3.3. 9.4
59.3.4. 9.6
59.3.5. PostgreSQL 10
59.4. PostgreSQL 配置
59.4.1. postgresql.conf
59.4.2. pg_hba.conf
59.5. 创建dba用户
60. 数据库管理(Database Administration)
60.1. 用户管理(User Account Management)
60.1.1. 创建用户
60.1.2. 删除用户
60.1.3. 修改用户名
60.1.4. 修改密码
60.2. Access Privilege System
60.2.1. SHOW GRANTS
60.2.2. show privileges
60.2.3. Grant privileges
60.2.4. Revoke privileges
60.2.5. Show Privileges
60.2.6. MAX_QUERIES_PER_HOUR/MAX_UPDATES_PER_HOUR
60.2.7. Table Privileges
60.2.8. Column Privileges
60.3. 字符集转换
60.3.1. 转换 latin1 到 UTF-8
60.4. 重新整理AUTO_INCREMENT字段
60.5. 数据库内容替换
60.6. Kill 脚本
60.7. MySQL 时区管理
60.8. SHOW COMMAND
60.8.1. 查看版本
60.8.2. status
60.8.3. show processlist
60.8.4. 线程的使用情况
60.8.5. DATABASES
60.8.6. 排序统计信息
60.8.7. Key 状态
60.8.8. FUNCTION
60.8.9. PROCEDURE
60.8.10. TRIGGERS
60.8.11. EVENTS
60.8.12. 引擎(ENGINES)
60.8.13. 字符集(Collation)
60.8.14. SHOW GRANTS
60.8.15. validate_password
60.9. Maintenance 数据库维护
60.9.1. CHECK 检查表
60.9.2. ANALYZE 分析表
60.9.3. CHECKSUM
60.9.4. OPTIMIZE 优化表
60.9.5. REPAIR 修复
60.10. INFORMATION_SCHEMA
60.10.1. 查询表字段
60.10.2. 列出所有触发器
60.10.3. 查看表数据尺寸
60.11. Backup and Recovery
60.11.1. Import / Export
60.11.2. Snapshot Backup
61. PostgreSQL 命令
61.1. psql - PostgreSQL interactive terminal
61.1.1. 执行文件
61.2. Backup / Restore
61.2.1. Backup
61.2.2. Restore
61.2.3. import
61.2.4. 导出指定 schema
61.2.5. PostgreSQL for windows
61.2.6. 大型数据库备份
61.2.7. schema之间迁移数据
62. DDL - Data Definition Language
62.1. 数据库管理(Database)
62.1.1. 创建数据库
62.1.2. 删除数据库
62.1.3. 修改数据库
62.1.4. 重命名数据库
62.1.5. 修改字符集
62.1.6. 查看数据库创建语句
62.2. 表管理(Table)
62.2.1. 数据类型
62.2.2. 基于现有表结构创建新空表
62.2.3. 基于已存在表创建新表
62.2.4. 修改表
62.2.5. 临时表
62.2.6. CHARACTER
62.2.7. DEFAULT
62.2.8. KEY
62.2.9. AUTO_INCREMENT 定义初始值
62.2.10. COMMENT
62.2.11. 修改表名
62.2.12. Engine 存储引擎
62.3. Partitioning
62.3.1. RANGE
62.3.2. LIST
62.3.3. HASH
62.3.4. KEY分区
62.3.5. Subpartitioning
62.3.6. 分区管理
62.3.7. EXPLAIN PARTITIONS
62.3.8. SHOW CREATE TABLE
62.3.9. INFORMATION_SCHEMA.partitions 表
62.3.10. 分区数据操作
62.4. Index
62.4.1. SHOW INDEX
62.4.2. CREATE INDEX
62.4.3. DROP INDEX
62.4.4. rebuild
62.5. 外键(Foreign Key)
62.5.1. FOREIGN KEY (RESTRICT)
62.6. 视图(View)
62.7. 存储过程(PROCEDURE)
62.7.1. 存储程序
62.7.2. EXECUTE 执行 SQL
62.7.3. PREPARE 传递参数
62.7.4. 存储过程返回数据
62.7.5. 结果集转JSON
62.7.6. 例子·过程返回结果
62.8. 函数
62.8.1. TIMESTAMP TO ISO8601
62.9. 触发器(Trigger)
62.9.1. create trigger
62.9.2. drop trigger
62.9.3. show triggers
62.9.4. EXAMPLE
62.10. 事件调度器(EVENT)
62.10.1. 启用 EVENT
62.10.2. 创建 EVENT
62.10.3. 禁用/启用
62.10.4. 查看 events
62.10.5. 删除 EVENT
62.10.6. EVENT 应用案例
63. DML (Data Manipulation Language)
63.1. INSERT 插入
63.1.1. INSERT INTO ... SELECT
63.1.2. INSERT IGNORE
63.1.3. INSERT...ON DUPLICATE KEY UPDATE
63.2. REPLACE 替换
63.3. DELETE 删除
63.3.1. 删除重复数据
63.3.2. 删除重复数据保留第一条
64. SQL Statement Syntax
64.1. DISTINCT
64.2. JOIN
64.2.1. LEFT JOIN / LEFT OUTER JOIN
64.2.2. JOIN / INNER JOIN
64.3. order by 排序
64.3.1. 处理 null
64.4. group by
64.4.1. 忽略 NULL
64.5. HAVING
64.6. REGEXP
64.7. IN / NOT IN
64.8. ALL / Any
64.9. exists, not exists
64.10. UNION
64.10.1. UNION ALL
64.10.2. 两张表字段不对等解决方法
64.11. OUTFILE/LOAD DATA INFILE
64.11.1. Export data to CSV from MySQL
64.11.2. Import data from CSV file.
64.12. CASE Syntax
64.13. 查询结果放入变量
64.14. MySQL 专有命令
64.14.1. SQL_NO_CACHE
64.14.2. SIGNAL Syntax
64.15. SQL 92
65. Functions and Operators
65.1. COUNT
65.2. UUID()
65.3. 字符串
65.3.1. LEFT/RIGHT
65.3.2. RPAD/LPAD
65.3.3. CONCAT
65.3.4. CONCAT_WS
65.3.5. 链接所有字段
65.3.6. GROUP_CONCAT
65.3.7. replace 字符串替换
65.3.8. SUBSTRING
65.3.9. SUBSTRING_INDEX
65.3.10. AES_ENCRYPT / AES_DECRYPT
65.4. Date and Time
65.4.1. year/month/day hour:minite:second
65.4.2. Unix time
65.4.3. DATE_FORMAT
65.4.4. DATE_SUB/DATE_ADD
65.4.5. datediff / timediff
65.5. 数值函数
65.5.1. cast 类型转换
65.5.2. truncate 保留小数位数
65.5.3. MOD 求余
65.6. Control Flow Functions
66. PostgreSQL GUI
66.1. pgAdmin III
66.2. phpPgAdmin
66.3. Monitoring
66.3.1. PgBadger
66.4. pgModeler - PostgreSQL Database Modeler
67. Barman Backup & recovery for PostgreSQL
68. pgbouncer - lightweight connection pooler for PostgreSQL
68.1. 安装 pgbouncer
68.1.1. Ubuntu
68.1.2. CentOS
68.2. 配置 pgbouncer
69. Foreign data wrappers
70. Barman for PostgreSQL
71. Connector
71.1. Pomm
72. Replication
72.1. Bucardo
73. FAQ
73.1. Reset root password 重置MySQL root密码
73.1.1. MySQL 5.7.x
73.1.2. MySQL 8.0
73.2. 查看错误代码
73.2.1. ERROR 1153 (08S01) at line 3168: Got a packet bigger than 'max_allowed_packet' bytes
73.2.2. ERROR 1129 (00000): Host 'XXXXXX' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'
73.3. 临时表是否需要建索引
73.4. [Warning] Changed limits: max_open_files: 5000 (requested 20480)
73.5. Table 'performance_schema.session_variables' doesn't exist
73.6. SQL Error (1038): Out of sort memory, consider increasing server sort buffer size
73.7. this is incompatible with sql_mode=only_full_group_by
73.8. ERROR 1071 (42000) at line 25: Specified key was too long; max key length is 767 bytes
73.9. ERROR 1086 (HY000): File '/var/lib/mysql-files/order.txt' already exists
73.10. ERROR 1114 (HY000): The table 'your_table' is full
73.11. Error Code: 1146. Table 'test.CACHE_UPDATE' doesn't exist
73.12. Error Code: 1175. You are using safe update mode and you tried to update a table without a WHERE that uses a KEY column.
73.13. ERROR 1273 (HY000) at line 3364: Unknown collation: 'utf8mb4_0900_ai_ci'
73.14. ERROR 1290 (HY000): The MySQL server is running with the --secure-file-priv option so it cannot execute this statement
73.15. ERROR 1364: 1364: Field 'id' doesn't have a default value
73.16. Error Code: 1292. Incorrect datetime value: '0000-00-00 00:00:00' for column 'create_time' at row 95692
73.17. ERROR 1415: Not allowed to return a result set from a trigger
73.18. ERROR 1503 (HY000): A PRIMARY KEY must include all columns in the table's partitioning function
73.19. ERROR 1819 (HY000): Your password does not satisfy the current policy requirements
73.20. ERROR 1820 (HY000): You must reset your password using ALTER USER statement before executing this statement.
73.21. ERROR 1840 (HY000) at line 24: @@GLOBAL.GTID_PURGED can only be set when @@GLOBAL.GTID_EXECUTED is empty.
73.22. ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'
73.23. ERROR 2013 (HY000): Lost connection to MySQL server during query
73.24. ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory
73.25. ERROR 3024 (HY000): Query execution was interrupted, maximum statement execution time exceeded
73.26. Error Code: 3780. Referencing column 'id' and referenced column 'id' in foreign key constraint 'FKfeti3hcwwku7l7xqru4emwkc6' are incompatible.
73.27. Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such fileor directory
73.28. com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Public Key Retrieval is not allowed
73.29. mysqldump: Couldn't execute 'SELECT COLUMN_NAME,
73.30. this is incompatible with sql_mode=only_full_group_by
73.31. mysqldump: [Warning] Using a password on the command line interface can be insecure.
73.32. mysql: [Warning] Using a password on the command line interface can be insecure.
73.33. 时间自动被加一秒
PostgreSQL 实用实例参考