可以并行调用2个postgresql函数吗?

问题描述 投票:0回答:1
CREATE OR REPLACE FUNCTION wrapperFunction()
  RETURNS bytea AS
$BODY$
BEGIN
    SELECT function1() || function2();
END;
$BODY$
  LANGUAGE plpgsql

有没有办法并行调用

function1
function2

(它们是只读的,无副作用且独立)

postgresql plpgsql
1个回答
0
投票

不,你不能那样做。

要并行调用两个函数,您需要有两个数据库会话。

© www.soinside.com 2019 - 2024. All rights reserved.