是从my_function()中调用函数select *的默认方式吗?
我问,因为我已经建立了一个不返回任何东西的函数,只需将数据插入到一个表中(来自sql Server的后台),就可以使用select * from …来感觉奇怪
我期待着像exec my_function()
使用PERFORM语句 –
http://www.postgresql.org/docs/current/static/plpgsql-statements.html
原文链接:https://www.f2er.com/postgresql/193139.htmlSometimes it is useful to evaluate an expression or SELECT query but
discard the result,for example when calling a function that has
side-effects but no useful result value. To do this in PL/pgsql,use
the PERFORM statement
所以只是
DO $$ BEGIN PERFORM my_function(); END $$;