Than you very much.
It worked.
I tried to extend it to pass message parameters. Tried code below but got
syntax error. How to pass message parameters ?
Andrus.
CREATE OR REPLACE FUNCTION RaiseException(text, variadic )
RETURNS void LANGUAGE plpgsql AS
$BODY$
BEGIN
RAISE EXCEPTION $1, $2;
END;
$BODY$;
SELECT RaiseException('Exception Param1=% Param2=%', 'textvalue', 2 );