PostgreSQL 9.2
主要特性
SQL 更改
通用
已添加
COLLATION FOR
表达式 (提交 6688d287)
已修改
ALTER DEFAULT PRIVILEGES
- 添加了对修改类型权限的支持 (提交 72920557)
ALTER DOMAIN
ALTER FOREIGN DATA WRAPPER
- 添加了
ALTER FOREIGN DATA WRAPPER ... RENAME TO ...
子句 (提交 5bcf8ede)
- 添加了
ALTER FOREIGN TABLE
ALTER INDEX
- 添加了
ALTER INDEX IF EXISTS ...
语法 (提交 b8a91d9d)
- 添加了
ALTER SEQUENCE
- 添加了
ALTER SEQUENCE IF EXISTS ...
语法 (提交 b8a91d9d)
- 添加了
ALTER SERVER
- 添加了
ALTER SERVER ... RENAME TO ...
子句 (提交 5bcf8ede)
- 添加了
ALTER TABLE
- 添加了
ALTER TABLE [ IF EXISTS] ... RENAME CONSTRAINT ... TO ...
语法 (提交 39d74e34)
- 添加了
ALTER VIEW
CREATE FOREIGN TABLE
- 添加了列级
OPTIONS
子句 (提交 c4096c76)
- 添加了列级
CREATE TABLE
CREATE VIEW
- 添加了
CREATE VIEW ... WITH ( view_option_name [= view_option_value ] )
语法 (提交 0e4611c0)
- 添加了
DROP INDEX
- 添加了
DROP INDEX CONCURRENTLY
语法 (提交 8cb53654)
- 添加了
EXPLAIN
- 添加了
TIMING
选项 (提交 af7914c6)
- 添加了
SECURITY LABEL
性能变更
ALTER TABLE ... ALTER TYPE
可以跳过以下类型更改的表/索引重建
后端更改
通用
- 在
external_pid_file
中指定的 pidfile 将被创建为全局可读 (提交 223d14a9) - 添加了 checkpointer 进程 (提交 bf405ba8)
postmaster
- 在 postmaster 和每个后端之间添加了管道,以便更容易检测 postmaster 死亡 (提交 89fd72cb)
锁定
- 添加了快速路径锁 (提交 3cba8999)
内存管理
- 添加了内存屏障支持 (提交 0c8eda62)
存储参数
已添加
钩子
添加了以下钩子
emit_log_hook
(提交 19dbc346)post_parse_analyze_hook
(提交 a40fa613)
数据类型更改
通用
系统目录更改
表
已添加
pg_range
(提交 4429f6a9)pg_shseclabel
(提交 463f2625)
已修改
pg_am
pg_attribute
- 添加了列
attfdwoptions
(提交 c4096c76)
- 添加了列
pg_class
- 添加了列
relallvisible
(提交 e6858e66)
- 添加了列
pg_constraint
- 将列
conisonly
重命名为connoinherit
(提交 09ff76fc)
- 将列
pg_locks
- 添加了列
fastpath
(提交 3cba8999)
- 添加了列
pg_proc
pg_statistic
- 添加了以下列(提交 0e5e167a)
stakind5
staop5
stanumbers5
stavalues5
- 添加了以下列(提交 0e5e167a)
pg_tablespace
- 移除了列
spclocation
并用函数pg_tablespace_location()
替换 (提交 16d8e594)
- 移除了列
视图
已修改
pg_stat_activity
pg_stat_bgwriter
pg_stat_database
pg_stat_replication
- 将列
procpid
重命名为pid
(提交 4f42b546)
- 将列
pg_stats
- 添加了以下列(提交 0e5e167a)
most_common_elems
most_common_elem_freqs
elem_count_histogram
- 添加了以下列(提交 0e5e167a)
系统函数更改
已添加
acldefault()
(提交 b376ec6f)array_to_json()
(提交 39909d1d)has_type_privilege()
(提交 72920557)isempty()
(提交 4429f6a9)lower(range)
(提交 4429f6a9)lower_inc()
(提交 4429f6a9)lower_inf()
(提交 4429f6a9)pg_export_snapshot()
(提交 bb446b68)pg_opfamily_is_visible()
(提交 b59d2fe4)pg_tablespace_location()
(提交 16d8e594)pg_trigger_depth()
(提交 74ab96a4)pg_xlog_location_diff()
(提交 bc5ac368)range_merge()
(提交 4429f6a9)row_to_json()
(提交 39909d1d)upper(range)
(提交 4429f6a9)upper_inc()
(提交 4429f6a9)upper_inf()
(提交 4429f6a9)
已修改
pg_cancel_backend()
- 非超级用户可以终止其在其他后端进程中的会话 (提交 c60ca19d)
pg_size_pretty()
- 添加了
numeric
输入格式 (提交 4a2d7ad7)
- 添加了
pg_terminate_backend()
- 非超级用户可以终止其在其他后端进程中的会话 (提交 c60ca19d)
string_agg()
xpath()
索引更改
配置更改
已添加
enable_indexonlyscan
(提交 a2822fb9)event_source
(提交 d8ea33f2)include_if_exists
指令 (提交 6d09b210)ssl_ca_file
(提交 a445cb92)ssl_cert_file
(提交 a445cb92)ssl_crl_file
(提交 a445cb92)ssl_key_file
(提交 a445cb92)temp_file_limit
(提交 23e5b16c)track_io_timing
(初始提交 40b9b957)
已修改
search_path
- 非存在的模式将静默忽略 (提交 880bfc32)
synchronous_commit
- 添加了
remote_write
设置 (初始提交 443b4821)
- 添加了
移除
custom_variable_classes
(提交 1a00c0ef)silent_mode
(提交 f7ea6bea)wal_sender_delay
(提交 cff75130)
libpq 更改
过程语言更改
PL/pgSQL
- 添加了
GET STACKED DIAGNOSTICS
命令 (提交 3d4890c0)
外部数据包装器更改
- 计划 API 改进,提供更灵活的连接计划 (提交 b1495393)
- 启用了 外部表 的统计信息收集 (提交 263d9de6)
- 为 外部表 添加了每列选项 (初始提交 9088d1b9)
- 为
ALTER FOREIGN DATA WRAPPER
和ALTER
SERVER 添加了RENAME
选项 (提交 5bcf8ede) CREATE TABLE (LIKE ...)
可以使用 外部表 定义 (提交 a9f2e31c)
信息模式
- 添加了视图
role_udt_grant
(提交 d34e142c) - 添加了视图
udt_privileges
(提交 d34e142c) - 添加了视图
user_defined_types
(提交 d34e142c)
服务器实用程序
已修改
initdb
- 识别服务器时区并将值写入
postgresql.conf
(提交 ca4af308) - 添加了选项
--auth-local
和--auth-host
(提交 8a02339e)
- 识别服务器时区并将值写入
核心实用程序
已添加
pg_receivexlog
(提交 d9bae531)
已修改
createuser
dropuser
- 添加了选项
--if-exists
(提交 7fe33a51)
- 添加了选项
pg_basebackup
- 能够从备用服务器创建基础备份 (提交 8366c780)
pg_dump
- 添加了选项
--section
(提交 a4cd6abc)
- 添加了选项
pg_restore
- 添加了选项
--section
(提交 a4cd6abc)
- 添加了选项
psql 更改
- 为
\x
命令添加了auto
选项 (提交 95d2af16) - 添加了
\ir
命令 (提交 c7f23494) - 添加了
\setenv
命令 (提交 e6d9e210) - 添加了
.psqlrc-X.X
(其中X.X
代表 PostgreSQL 主版本号)的处理 (提交 2795592e) - 现在识别
PSQL_HISTORY
和PSQLRC
环境变量 (提交 34c97844) - 添加了
COMP_KEYWORD_CASE
变量以控制制表符补全中的关键字大小写 (提交 db84ba65)
Contrib模块
已添加
pg_test_timing
(提交 cee52386)tcn
(提交 6e3323d4)
已修改
file_fdw
- 添加了
force_not_null
选项 (提交 86a3f2d4)
- 添加了
pgbench
pg_stat_statements
- SQL 文本标准化 (提交 7313cc01)
- 添加了脏缓冲区计数 (提交 22543674)
- 添加了列
blk_read_time
和blk_write_time
,如果启用track_io_timing
则会填充 (提交 5b4f3466)
pg_upgrade
pg_upgrade
的环境变量已重命名为以 PG 开头;PGPORT 被忽略并被PGPORTOLD
/PGPORTNEW
替换 (提交 a88f4496)- 默认使用端口 50432 (提交 a88f4496)
- 常规日志改进 (提交 717f6d60)
- 旧集群仅在使用了链接模式时才会被锁定 (提交 2127aac6)
- 添加了用于增量生成更精确统计信息的脚本 (提交 faec2815)
- 移除了日志选项
-g
/-G
/-l
(提交 717f6d60) - 添加了选项
-o
/-O
(提交 0dc3f57b) - 添加了选项
-r
/--retain
(提交 717f6d60) - 改进了
-v
/--verbose
的行为 (提交 717f6d60) - 支持升级不包含 postgres 数据库的集群 (提交 a50d860a)
sepgsql
vacuumlo
- 添加了选项
-l
(初始提交 b69f2e36)
- 添加了选项
预发布测试版本
标志着 PostgreSQL 9.2
开发开始的初始提交是 c9627922 (2011-06-11)。