Reputation: 9954
How can you run a script in multiple PostgreSQL databases in Mac?
Upvotes: 1
Views: 1702
Reputation: 36759
for db in first_db second_db ...; do
psql -d $db -f yourscript.sql
done
Of course there will be many variations depending on exactly what you want to do.
Upvotes: 4