Skip to content

allow empty dbnames in deadpool-postgres config - #501

Merged
bikeshedder merged 3 commits into
deadpool-rs:mainfrom
incertia:postgres-default-dbname
Sep 4, 2026
Merged

bikeshedder merged 3 commits into
deadpool-rs:mainfrom
incertia:postgres-default-dbname

Conversation

@incertia

Copy link
Copy Markdown
Contributor

the underlying postgres driver interprets empty dbnames as using the username. this PR lets config.dbname == None pass when creating the tokio_postgres::Config, deletes the error variant, and adds a test that replicates basic. much like how running the test suite requires the deadpool database to exist, the new defaultdb test will require that the database corresponding to the current username exists.

@bikeshedder bikeshedder added enhancement New feature or request A-postgres Area: PostgreSQL support / deadpool-postgres labels Aug 31, 2026
@bikeshedder
bikeshedder merged commit d2766e2 into deadpool-rs:main Sep 4, 2026
14 checks passed
@bikeshedder

Copy link
Copy Markdown
Collaborator

Makes sense. Yes! Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-postgres Area: PostgreSQL support / deadpool-postgres enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants