Closed jcrossley3 closed 5 months ago
@jcrossley3 thanks for the issue. I opened #57 and added an integration test to define the expected behavior for using the bootstrap superuser (which is currently hard-coded to postgres
). If you need additional (super)users, you can use PsqlBuilder to create them as needed. Let me know if this addresses your question, or if you have any thoughts on how the behavior might be changed/improved for your use-cases.
@brianheineman that test appears to duplicate my use case exactly. thanks for the quick fix!
@jcrossley3 I just released v0.9.0 with this fix.
https://github.com/theseus-rs/postgresql-embedded/blob/9ef5d215f592aa1a30cb0f87351e029d332f14fd/postgresql_embedded/src/postgresql.rs#L311
If I set a username in the
Settings
used to construct aPostgreSQL
instance, thencreate_database
is going to fail without setting the db name topostgres
.What's The Right Way to both create a superuser and create a database via the
PostgreSQL
instance? Thanks!