0

I use it in postgres for system development.

When testing, I would like to create a clean DB and proceed with the test based on it. Is it possible with postgres?

In the case of sqlite, it is possible to create a temporary database by coding as follows.

engine = create_engine('sqlite:///./test_temp.db', echo=False)

_session_factory = scoped_session(
    sessionmaker(autocommit=False, autoflush=False, bind=engine)
)

How can I achieve this with postgres?

2
  • Specifically this answer to allow creation of temporary database. Commented Jul 15, 2021 at 4:28
  • thank you. I decided to use this library Commented Jul 15, 2021 at 7:51

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.