RAISE STATEMENT
Description
Use the
RAISEstatement to report messages and raise errors.
Click here to navigate to the PostgreSQL documentation page for this syntax.
Notice that this translation spec applies only to RAISE statements that have level with the value of NOTICE and EXCEPTION.
Raise Statement is translated to a Procedure Call
Grammar Syntax
RAISE [ level ] 'format' [, expression [, ... ]] [ USING option = expression [, ... ] ];
RAISE [ level ] condition_name [ USING option = expression [, ... ] ];
RAISE [ level ] SQLSTATE 'sqlstate' [ USING option = expression [, ... ] ];
RAISE [ level ] USING option = expression [, ... ];
RAISE ;Sample Source Patterns with RAISE NOTICE
Greenplum
CREATE FUNCTION FunctionName1() RETURNS void
AS $$
declare
v_var1 character varying(50);
v_var2 character varying(50);
BEGIN
v_var1 := 'First';
v_var2 := 'Second';
RAISE NOTICE '% - Current schema is %',v_var1, v_var2;
END;
$$
LANGUAGE plpgsql NO SQL;Snowflake
Sample Source Patterns with RAISE EXCEPTION
Greenplum
Snowflake
Related EWIs
MSCINF0040: Raise notice translated to user-defined stored procedure.
MSC-PG0013: Unsupported Raise Exception.
MSCINF0042: Raise Exception translated to user-defined stored procedure call and raise stat.
Last updated
Was this helpful?