代码之家  ›  专栏  ›  技术社区  ›  James Webster Jonathan Wood

PostgreSQL中“集合返回函数”的完整列表是什么?

  •  0
  • James Webster Jonathan Wood  · 技术社区  · 2 年前

    在将PostgreSQL 9.6数据库升级到10+的过程中,我遇到了设置返回函数的突破性变化,例如 jsonb_object_keys json_array_elements_text ,不能再用于 CASE 表达。

    在PostgreSQL中哪里可以找到集合返回函数(包括内置函数)的最终列表-在PostgreQL文档中似乎没有引用,并且的结果集 SELECT * FROM information_schema.routines 似乎没有指示“结果类型为集合”的明显列。

    1 回复  |  直到 2 年前
        1
  •  1
  •   klin    2 年前

    查询系统目录 pg_proc .

    select *
    from pg_proc
    where proretset
    

    根据 the documentation proretset 包含此信息。

    proretset bool

    函数返回一个集合(即指定数据类型的多个值)

    另请参阅 PostgreSQL error: CASE with JSON set-returning functions