Complete the code to raise a notice message in PostgreSQL.
RAISE [1] 'This is a notice message';
The NOTICE level is used to send informational messages without stopping execution.
Complete the code to raise an exception with a custom error message.
RAISE [1] 'Custom error occurred';
The EXCEPTION level raises an error and stops the function or transaction.
Fix the error in the code to raise a warning message.
RAISE [1] 'This is a warning';
The correct keyword for warnings is WARNING. WARN is not valid.
Fill both blanks to raise a notice with a variable value.
RAISE [1] 'Value is: %', [2];
Use NOTICE to raise a notice and pass the variable my_var as the argument.
Fill all three blanks to raise an exception with a formatted message including a variable.
RAISE [1] 'Error code %: %', [2], [3];
Use EXCEPTION to raise an error. The placeholders % are replaced by error_code and error_message.
