1

如何在 Mac 中的多个 PostgreSQL 数据库中运行脚本?

4

1 回答 1

4
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.

于 2013-01-02T15:41:23.420 回答