I'm trying to run this in PostgreSQL 9.2:
RAISE NOTICE 'hello, world!';
And the server says:
Error : ERROR: syntax error at or near "RAISE" LINE 1: RAISE NOTICE 'hello, world!' ^
Why?
Use an anonymous code block:
DO language plpgsql $$ BEGIN RAISE NOTICE 'hello, world!'; END $$;
Variables are referenced using %:
%
RAISE NOTICE '%', variable_name;
2.1m questions
2.1m answers
60 comments
57.0k users