RAISE level 'format' , variable ...;
- Inside the format, % is replaced by the next argument's
- external representation. Double %'s are output as %.
- Possible levels are DEBUG (silently suppressed in production
- running databases), NOTICE (written into the database log and forwarded to
- the client application) and EXCEPTION (written into the database log and
+ Possible levels are DEBUG (write the message into the postmaster log),
+ NOTICE (write the message into the postmaster log and forward it to
+ the client application) and EXCEPTION (raise an error,
aborting the transaction).
+ Inside the format string, % is replaced by the next
+ optional argument's external representation.
+ Write %% to emit a literal %.
+ Note that the optional arguments must presently
+ be simple variables, not expressions, and the format must be a simple
+ string literal.
+
+
-RAISE NOTICE ''Id number '' || key || '' not found!'';
RAISE NOTICE ''Calling cs_create_job(%)'',v_job_id;
- In this last example, v_job_id will replace the % in the
+ In this example, the value of v_job_id will replace the % in the
string.
RAISE EXCEPTION ''Inexistent ID --> %'',user_id;
- This will abort the transaction and write to the database log.
+ This will abort the transaction with the given error message.