I'm running a large sql script with postgres as follows:
psql < scriptname.sql
Each sql statement has a comment explaining (using -- syntax) what it does but it isnt output, and its difficult to match up each statement with output. I simply want to output the comments together with the results of the statements
Search for the \echo command in the psql reference.
This is psql specific though...
Turn echo on with
--echo-all
then use it with \echo type your text
\echo My comment
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