I'm converting plsql to PostgreSQL. In plsql:
declare
W_USR_EXCE EXCEPTION;
......
raise W_USR_EXCE;
I have converted in PostgreSQL like this
IF (W_DAY_TOTAL_AMT > W_NEW_LIMIT) THEN
W_ERR_MSG := 'Exceeds Benificiary Limit';
RETURN EXCEPTION USING ERRCODE = '50011';
if "if" condition executed am getting "W_ERR_MSG" message along with that i need EXCEPTION to return
but it is not returning any value. Please help me to solve this error.