PostgreSQL 18 · Connecting
Run a SQL file
Execute the statements in a file and stop at the first error.
psql -U postgres -d mydb -v ON_ERROR_STOP=1 -f script.sql
Official PostgreSQL 18 documentation
PostgreSQL 18 · Connecting
Execute the statements in a file and stop at the first error.
psql -U postgres -d mydb -v ON_ERROR_STOP=1 -f script.sql
Official PostgreSQL 18 documentation
Was this page helpful?