选择 打开 改范围 完整检索页

pgsql.cc 提供对 postgresql.org 官网内容的中文翻译,由 Pigsty 团队维护。

文档 / 函数百科 / 12 变更

PostgreSQL 12 函数变更

相对 PostgreSQL 11 的差异:12 共有 556 个函数、684 条签名。

换一个对比基准

汇总

  1. 24新增函数
  2. 0移除函数
  3. 4签名变化
  4. 0换了分组

「签名变化」指函数还在,但它的签名有增有删;只改说明文字不计入。「换了分组」指手册把这个函数挪到了另一页。

新增函数24

  • acosh数学函数和操作符

    反双曲余弦

    acosh ( x )

    1 条签名

  • asinh数学函数和操作符

    反双曲正弦

    asinh ( x )

    1 条签名

  • atanh数学函数和操作符

    反双曲切线

    atanh ( x )

    1 条签名

  • cosh数学函数和操作符

    双曲余弦

    cosh ( x )

    1 条签名

  • log10数学函数和操作符

    以10为底的对数 (与 log 相同)

    log10 ( dp or numeric ) → (same as input)

    1 条签名

  • sinh数学函数和操作符

    双曲正弦

    sinh ( x )

    1 条签名

  • tanh数学函数和操作符

    双曲切线

    tanh ( x )

    1 条签名

  • jsonb_path_existsJSON 函数和操作符

    检查JSON路径是否返回指定JSON值的任何项。

    jsonb_path_exists ( target jsonb, path jsonpath [, vars jsonb [, silent bool]] ) → boolean

    1 条签名

  • jsonb_path_matchJSON 函数和操作符

    返回指定JSON值的JSON路径谓词检查的结果。

    jsonb_path_match ( target jsonb, path jsonpath [, vars jsonb [, silent bool]] ) → boolean

    1 条签名

  • jsonb_path_queryJSON 函数和操作符

    为指定的JSON值返回由JSON路径返回的所有JSON项。

    jsonb_path_query ( target jsonb, path jsonpath [, vars jsonb [, silent bool]] ) → setof jsonb

    1 条签名

  • jsonb_path_query_arrayJSON 函数和操作符

    以JSON数组的形式返回由JSON路径为指定的JSON值返回的所有JSON项。

    jsonb_path_query_array ( target jsonb, path jsonpath [, vars jsonb [, silent bool]] ) → jsonb

    1 条签名

  • jsonb_path_query_firstJSON 函数和操作符

    为指定的JSON值返回由JSON路径返回的第一个JSON项。

    jsonb_path_query_first ( target jsonb, path jsonpath [, vars jsonb [, silent bool]] ) → jsonb

    1 条签名

  • acldefault系统信息函数和操作符

    构造一个aclitem数组,保存属于具有OID ownerId的角色的对象类型type的默认访问权限。

    acldefault ( type, ownerId ) → aclitem[]

    1 条签名

  • aclexplode系统信息函数和操作符

    以行集的形式返回aclitem数组。

    aclexplode ( aclitem[] ) → setof record

    1 条签名

  • makeaclitem系统信息函数和操作符

    使用给定的属性构造 aclitem 。

    makeaclitem ( grantee, grantor, privilege, grantable ) → aclitem

    1 条签名

  • pg_copy_logical_replication_slot系统管理函数

    复制一个名为src_slot_name的现有逻辑复制槽到一个名为dst_slot_name的逻辑复制槽,选择性的改变输出插件和持久性。

    pg_copy_logical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean [, plugin name]] ) → (slot_name name, lsn pg_lsn)

    1 条签名

  • pg_copy_physical_replication_slot系统管理函数

    将一个名为src_slot_name的现有物理复制槽复制到一个名为dst_slot_name的物理复制槽。

    pg_copy_physical_replication_slot ( src_slot_name name, dst_slot_name name [, temporary boolean] ) → (slot_name name, lsn pg_lsn)

    1 条签名

  • pg_ls_archive_statusdir系统管理函数

    返回服务器的WAL归档状态目录(pg_wal/archive_status)中的每个普通文件的名称、大小、和最后修改时间(mtime)。

    pg_ls_archive_statusdir ( ) → setof record

    1 条签名

  • pg_ls_tmpdir系统管理函数

    返回针对指定tablespace的临时文件目录中的每个普通文件的名称、大小、和最后修改时间(mtime)。

    pg_ls_tmpdir ( [tablespace oid] ) → setof record

    1 条签名

  • pg_partition_ancestors系统管理函数

    列出给定分区的祖先关系,包括关系本身。

    pg_partition_ancestors ( regclass ) → setof regclass

    1 条签名

  • pg_partition_root系统管理函数

    返回给定关系所属的分区树的最顶级父节点。

    pg_partition_root ( regclass ) → regclass

    1 条签名

  • pg_partition_tree系统管理函数

    列出给定分区表或分区索引的分区树中的表或索引,每行对应一个分区。

    pg_partition_tree ( regclass ) → setof record

    1 条签名

  • pg_promote系统管理函数

    将备库提升为主库状态。

    pg_promote ( wait boolean DEFAULT true, wait_seconds integer DEFAULT 60 ) → boolean

    1 条签名

  • pg_mcv_list_items统计信息函数

    pg_mcv_list_items 返回多列 MCV 列表中存储的所有项的列表,返回列如下:

    仅正文提及

移除函数0

这一版没有移除函数。

签名变化4

函数 分组 增删 第一条新增签名
substring 字符串函数和操作符 +2 substring(string from pattern for escape-character)
date_trunc 时间/日期函数和操作符 +2−1 date_trunc ( text, timestamp with time zone, text ) → timestamp with time zone
XMLEXISTS XML 函数 +1−1 XMLEXISTS(text PASSING [BY { REF | VALUE }] xml [BY { REF | VALUE }])
XMLTABLE XML 函数 +1−1 xmltable( [XMLNAMESPACES(namespace uri AS namespace name[, ...]), ] row_expression PASSING [BY { REF | VALUE }] document_expression [BY { REF | VALUE }] COLUMNS name { type [PATH column_expression] [DEFAULT default_expression] [NOT NULL | NULL] | FOR ORDINALITY } [, ...] )

换了分组0

这一版没有函数换分组。