Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在 Mac 中的多个 PostgreSQL 数据库中运行脚本?
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.