i want to throw error in function postgresql
, but how if i want to exclude/remove the context from it errors?
what i try so far
RAISE 'messages error here (%) and here', NEW.request
USING HINT = 'hint messages here';
i got return message error
, hint
and context
..
SQLSTATE[P0001]: Raise exception: 7 ERROR: messages error here (var) and here\nHINT: hint messages here\nCONTEXT: PL/pgSQL function approval_list_fnc_status() line 23 at RAISE (SQL: update "table" set "field1" = value1, "field2" = value2 where "id" = 9528ac4b-e20f-4be4-b251-42f0e28df9a9)"
how if i want to exclude the context
from error?
The context information is always there, but all the attributes of an error message (detail, hint, context, ...) are separate, and it is up to your client code to use only the ones you are interested in.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.