0

I am new to Postgresql, and look for some help. My question is that I want to save the data/tables into another remote hard drive to which my machines connect but the solutions from here, here, or here only discuss how to do this process through Postgresql directly, and I am wondering whether this can be done through sqlalchemy. Can anyone help? Thanks so much.

Below are the codes I use to create the database:

database = "foo"
engine = sqlalchemy.create_engine("postgres://postgres@/postgres")
conn = engine.connect()
conn.execute("commit")
conn.execute("drop database " + database)
conn.close()
tzu
  • 183
  • 1
  • 9

1 Answers1

0

You can't and shouldn't want to. Connecting to a Postgres database means that you leave the database to decide where data is stored. In the database you can define where to store data.

Dick Kniep
  • 518
  • 4
  • 11