Printing run time messages in postgres

Yes, you can use RAISE NOTICE like below. It’s correct the way you are doing.

RAISE NOTICE 'i want to print % and %', var1,var2;

See here for more information https://www.postgresql.org/docs/current/static/plpgsql-errors-and-messages.html

EDIT:

begin
INSERT INTO tbl1 (col1) values (val1);
raise notice 'insert tbl1 done!';
end;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)