Getting the following error with the following line of code:
RAISE NOTICE '*** Rolling back job run id ' || CONVERT(varchar, v_job_run_id)
|| ' for table ' || v_table_name || '***';
Error:
ERROR: syntax error at or near “|” LINE 43: RAISE NOTICE ‘*
Rolling back job run id ‘ || CONVERT(var…
A message string in
RAISEXXXX statement should be literal constant – expression is not allowed there. It is similar to format string in printf like functions.Second issue should be
CONVERT, that is not supported in Pg – useCASTinstead or nothing, any parameter of RAISE statement is converted to text automatically.