Closed pmooney-socraticworks closed 1 month ago
We don't have this yet, but should. I'm open to ideas how best to support it. I think it should be possible internally, but we need a good api to expose to the user.
This was fixed with #148 and will be in the next release (ETA Monday)
When you start a PGlite you can now pass a username and database name to connect to a specific databases as a specific user.
Wow, thanks @samwillis !!
I want to leverage the template database feature in Postgres to quickly revert my test database to a pristine state between tests. I'm able to create a separate database to serve as the template, but noticed that every operation happens under the
template1
database. I can't revert that database because Postgres says it's a template database and can't be dropped.Is there a way to change the current database for a PGlite instance?