With the latest update of PostgreSQL supporting procedures. The official blog, quoted that \"As opposed to functions, procedures are not required to return a val
How about using the RAISE statement?
https://www.postgresql.org/docs/10/static/plpgsql-errors-and-messages.html