Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add psql_database argument postgres operations/facts #1215

Open
wants to merge 4 commits into
base: 3.x
Choose a base branch
from

Conversation

hamishfagg
Copy link

This PR adds the ability to specify which database psql should connect to for postgres/postgresql operaitons and facts.

I can into an issue where I wanted to create a postgres role my_role with CREATEDB, and then connect as that new user to create a database that they owned. Because postgres defaults to connecting to the db with the same name as the role, I would get an error like: FATAL: database "my_role" does not exist.

This method is necessary when using managed postgres services from cloud providers that don't provide superuser access, meaning you can't change the owner of a database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant