I'm thinking something in the lines of DBMS_OUTPUT.PUT_LINE
in Oracle, it allows you to trace what's going on in a stored procedure in the exactly same way you would use printf
, puts
or some other STDIO
writing proc in a "normal" programming language, i.e.
DBMS_OUTPUT.PUT_LINE('I got here:'||:new.col||' is the new value');
is there any way of doing this in Postgres?
If not, what's the "community way" of doing this? Creating a table with a string row and inserting debug values there?
You can use RAISE NOTICE
like this:
RAISE NOTICE 'I got here:% is the new value', NEW.col;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With