使用RETURNS void如下:
原文链接:https://www.f2er.com/postgresql/193418.htmlCREATE FUNCTION stamp_user(id int,comment text) RETURNS void AS $$ #variable_conflict use_variable DECLARE curtime timestamp := now(); BEGIN UPDATE users SET last_modified = curtime,comment = comment WHERE users.id = id; END; $$ LANGUAGE plpgsql;