Tuesday, September 9, 2025

How to set echo in a SQL script executed in psql

Use one of two options 1. in the sql file, add the following directive
\set ECHO queries
2. execute the script using the -e flag
psql -e -f myfile.sql

No comments:

Post a Comment