Can we use RAISE NOTICE
in postgres as equivalent of RAISERROR
\'message to display\' WITH NOWAIT
in SQL Server, or is there a better way
You could also do normal selects without the DO
block.
INSERT INTO tbl1 (col1) values (val1);
SELECT 'insert tbl1 done!' as msg;
UPDATE tbl2 set col2='val2' where ...;
SELECT 'update tbl2 done!' as msg;
The tradeoff is that it does add extra clutter to the output, like
UPDATE 1
msg
-----------------
update tbl2 done!
(1 row)