2
是否可以从其他PL/Python块的PL/Python函数调用Python函数作为普通Python函数。从另一个PL/Python块调用postgres PL/Python存储函数
例如,我有一个函数F1:
create or replace function f1() returns text as $$
return "hello"
$$ language 'plpython3u';
我想调用其他函数或块这个功能,例如这个匿名块:使用t = plpy.execute("select f1()")
do $$
begin
...
t = f1()
...
end;
$$ language 'plpython3u';
这是可以做到,但我想,如果可能的话,将其称为正常的Python函数以避免类型转换(例如jsonb等)。
(我正在使用plpython3u〜Python 3)。