1

How can you run a script in multiple PostgreSQL databases in Mac?

1 Answer 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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.