pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。
相对 PostgreSQL 9.4 的差异:9.5 共有 476 个函数、593 条签名。
「签名变化」指函数还在,但它的签名有增有删;只改说明文字不计入。「换了分组」指手册把这个函数挪到了另一页。
factorial数学函数和操作符
阶乘
factorial ( bigint ) → numeric
bound_box几何函数和操作符
计算两个方框的边界框。
bound_box ( box, box ) → box
inet_merge网络地址函数和操作符
计算包含两个给定网络的最小网络。
inet_merge ( inet, inet ) → cidr
inet_same_family网络地址函数和操作符
测试地址是否属于同一IP族。
inet_same_family ( inet, inet ) → boolean
json_strip_nullsJSON 函数和操作符
递归地删除给定 JSON 值中所有值为 null 的对象字段。
json_strip_nulls ( from_json json ) → json jsonb
jsonb_build_arrayJSON 函数和操作符
根据可变参数列表构建可能异构类型的JSON数组。
jsonb_build_array ( VARIADIC "any" )
jsonb_build_objectJSON 函数和操作符
根据可变参数列表构建一个JSON对象。
jsonb_build_object ( VARIADIC "any" )
jsonb_objectJSON 函数和操作符
从文本数组构建JSON对象。
jsonb_object ( text[] )
jsonb_prettyJSON 函数和操作符
将给定的JSON值转换为精美打印的,缩进的文本。
jsonb_pretty ( from_json jsonb ) → text
jsonb_setJSON 函数和操作符
返回target,将path指定的项替换为new_value, 如果create_if_missing为真(此为默认值)并且path指定的项不存在,则添加new_value。
jsonb_set ( target jsonb, path text[], new_value jsonb [, create_missing boolean] ) → jsonb
jsonb_strip_nullsJSON 函数和操作符
递归地删除给定 JSON 值中所有值为 null 的对象字段。
jsonb_strip_nulls ( from_json jsonb ) → json jsonb
to_jsonbJSON 函数和操作符
将任何SQL值转换为json或jsonb。
to_jsonb ( anyelement )
array_position数组函数和操作符
返回阵列中第二个参数中第一次发生的下标,如果它不存在,则返回NULL。
array_position ( anyarray, anyelement [, int] ) → int
array_positions数组函数和操作符
返回作为第一个参数的数组中第二个参数所有出现的下标的数组。
array_positions ( anyarray, anyelement ) → int[]
range_merge范围/多范围函数和操作符
计算包含两个给定范围的最小范围。
range_merge ( anyrange, anyrange ) → anyrange
GROUPING聚合函数
返回一个位掩码以指示哪个GROUP BY表达式没有包含在当前分组集中。
GROUPING ( args... ) → integer
jsonb_agg聚合函数
收集所有输入值,包括空值,到一个JSON数组。
jsonb_agg ( expression ) → jsonb
jsonb_object_agg聚合函数
将所有键/值对收集到一个JSON对象中。
jsonb_object_agg ( name, value ) → jsonb
pg_get_object_address系统信息函数和操作符
返回包含足够信息的行以唯一标识由类型代码、对象名称和参数数组指定的数据库对象。
pg_get_object_address ( type text, name text[], args text[] ) → classid oid, objid oid, objsubid integer
pg_identify_object_as_address系统信息函数和操作符
返回包含足够信息的行以唯一标识由目录OID、对象OID和子对象ID指定的数据库对象。
pg_identify_object_as_address ( classid oid, objid oid, objsubid integer ) → type text, object_names text[], object_args text[]
pg_last_committed_xact系统信息函数和操作符
返回最近提交的事务的事务ID、提交时间戳和复制源头。
pg_last_committed_xact ( ) → xid xid, timestamp timestamp with time zone
pg_xact_commit_timestamp系统信息函数和操作符
返回事务的提交时间戳。
pg_xact_commit_timestamp ( xid ) → timestamp with time zone
row_security_active系统信息函数和操作符
在当前用户和当前环境的上下文之中,指定表的行级安全是活动的吗?
row_security_active ( table ) → boolean
to_regnamespace系统信息函数和操作符
将文本模式名转换为它的OID。
to_regnamespace ( schema_name ) → regnamespace
to_regrole系统信息函数和操作符
将文本角色名转换为它的OID。
to_regrole ( role_name ) → regrole
brin_summarize_new_values系统管理函数
扫描指定的BRIN索引以查找基表中当前尚未生成索引摘要的页面范围; 对于任何这样的范围,它都通过扫描这些表页来创建一个新的摘要索引元组。
brin_summarize_new_values ( index_oid regclass ) → integer
pg_replication_origin_advance系统管理函数
将给定节点的复制进度设置为给定的位置。
pg_replication_origin_advance ( node_name text, pos pg_lsn ) → void
pg_replication_origin_create系统管理函数
用给定的外部名称创建一个复制源,并且返回分配给它的内部 ID。
pg_replication_origin_create ( node_name text ) → oid
pg_replication_origin_drop系统管理函数
删除一个以前创建的复制源,包括任何相关的重放进度。
pg_replication_origin_drop ( node_name text ) → void
pg_replication_origin_oid系统管理函数
通过名称查找复制源并返回其内部ID。
pg_replication_origin_oid ( node_name text ) → oid
pg_replication_origin_progress系统管理函数
返回给定复制元的重放位置。
pg_replication_origin_progress ( node_name text, flush bool ) → pg_lsn
pg_replication_origin_session_is_setup系统管理函数
如果在当前会话中选择了复制源则返回真。
pg_replication_origin_session_is_setup ( ) → bool
pg_replication_origin_session_progress系统管理函数
返回当前会话中选择的复制源的重放位置。
pg_replication_origin_session_progress ( flush bool ) → pg_lsn
pg_replication_origin_session_reset系统管理函数
取消pg_replication_origin_session_setup()的效果。
pg_replication_origin_session_reset ( ) → void
pg_replication_origin_session_setup系统管理函数
将当前会话标记为从给定的复制源重放,从而允许跟踪重放进度。
pg_replication_origin_session_setup ( node_name text ) → void
pg_replication_origin_xact_reset系统管理函数
取消pg_replication_origin_xact_setup()的效果。
pg_replication_origin_xact_reset ( origin_lsn pg_lsn, origin_timestamp timestamptz ) → void
pg_replication_origin_xact_setup系统管理函数
将当前事务标记为重放在给定LSN和时间戳上提交的事务。
pg_replication_origin_xact_setup ( origin_lsn pg_lsn, origin_timestamp timestamptz ) → void
pg_event_trigger_ddl_commands事件触发器函数
当在一个ddl_command_end事件触发器的函数中调用时,pg_event_trigger_ddl_commands返回被每一个用户动作执行的DDL命令的列表。
pg_event_trigger_table_rewrite_oid事件触发器函数
返回将要重写的表的OID。
pg_event_trigger_table_rewrite_oid ( ) → Oid
pg_event_trigger_table_rewrite_reason事件触发器函数
返回一个说明重写原因的代码。
pg_event_trigger_table_rewrite_reason ( ) → int
这一版没有移除函数。
| 函数 | 分组 | 增删 | 第一条新增签名 |
|---|---|---|---|
width_bucket |
数学函数和操作符 | +3−2 | width_bucket ( operand dp, b1 dp, b2 dp, count int ) → int |
box |
几何函数和操作符 | +1 | box ( point ) → box |
array_agg |
聚合函数 | +1 | array_agg ( expression ) → same as argument data type |
generate_series |
集合返回函数 | +2−2 | generate_series ( start, stop ) → setof int, setof bigint, or setof numeric (same as argument type) |
pg_describe_object |
系统信息函数和操作符 | +1−1 | pg_describe_object ( classid oid, objid oid, objsubid integer ) → text |
pg_identify_object |
系统信息函数和操作符 | +1−1 | pg_identify_object ( classid oid, objid oid, objsubid integer ) → type text, schema text, name text, identity text |
pg_ls_dir |
系统管理函数 | +1−1 | pg_ls_dir ( dirname text [, missing_ok boolean, include_dot_dirs boolean] ) → setof text |
pg_read_binary_file |
系统管理函数 | +1−1 | pg_read_binary_file ( filename text [, offset bigint, length bigint [, missing_ok boolean] ] ) → bytea |
pg_read_file |
系统管理函数 | +1−1 | pg_read_file ( filename text [, offset bigint, length bigint [, missing_ok boolean] ] ) → text |
pg_stat_file |
系统管理函数 | +1−1 | pg_stat_file ( filename text[, missing_ok boolean] ) → record |
这一版没有函数换分组。