小编Ben*_*Ben的帖子

在函数体之前还是之后声明“LANGUAGE plpgsql”?

之间有什么区别:

CREATE FUNCTION func() RETURNS integer
    LANGUAGE plpgsql AS $$
    declare
    begin
      -- do something
    end
$$;
Run Code Online (Sandbox Code Playgroud)

CREATE FUNCTION func() RETURNS INTEGER AS $$
    declare
    begin
      -- do something
    end
$$ LANGUAGE plpgsql;
Run Code Online (Sandbox Code Playgroud)

LANGUAGE plpgsql基本上只需要超出使用范围吗$$

postgresql syntax quotes plpgsql user-defined-functions

6
推荐指数
1
解决办法
2250
查看次数