首页 > 解决方案 > Postgresql:带子句功能

问题描述

PostgreSQL 是否支持 with Clause 中的函数?oracle 具有以下功能

WITH
  function add_fnc(p_id number) return number
  is
  begin
    return p_id + 1; 
  end;
select add_fnc(id1) from test_tbl;

标签: postgresqlfunctionwith-clause

解决方案


PostgreSQL中没有 CTE 函数(正如 cofemann 指出的那样),但您正在寻找的似乎是临时函数。看看如何在 PostgreSQL 中创建临时函数?


推荐阅读