我知道我可以做plpgsql:RAISE Exception '%', variable_name;
但我需要用两个值引发异常:
raise exception 'values %, % are incorrect please check.'(val1,val2);
Run Code Online (Sandbox Code Playgroud)
无论我尝试什么,我仍然得到syntax error
手册没有说明如何做到这一点: https ://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html
我该如何正确设置?
你错过了,
raise exception 'values %, % are incorrect please check.',val1,val2;
Run Code Online (Sandbox Code Playgroud)