I am trying to run multiple SQL files in a single transaction of PostgreSQL. In Linux environments this can actually be achieved by using here-document as:
psql -U postgres -h localhost -d mydatabase << files
BEGIN;
\i file1.sql
\i file2.sql
commit;
files
But I am unable to achieve the same in Windows environment.
psql .. -f commands.sql