I am not able to spool the query with results, we need query also in the output file. Is there any way to display query also in output file with results, other than \qecho as we have multiple sql queries in sql file.
psql docs:
-e
--echo-queries Copy all SQL commands sent to the server to standard output as well. This is equivalent to setting the variable ECHO to queries.