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

postgresql_privs should allow to set default privileges globally #199

Open
michaelkebe opened this issue Feb 24, 2022 · 2 comments
Open

Comments

@michaelkebe
Copy link

SUMMARY

postgresql_privs should allow to create global default privileges (without a schema) on a database.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

postgresql_privs

ADDITIONAL INFORMATION

Currently it only possible to create default privileges with a schema (which defaults to public, if not set). The PostgreSQL documentation says:

The privileges can be set globally (i.e., for all objects created in the current database), or just for objects created in specified schemas.
(from https://www.postgresql.org/docs/current/sql-alterdefaultprivileges.html)

If the IN SCHEMA schema_name part is omitted, the created privileges is set globally.

@michaelkebe michaelkebe changed the title postgresql_privs should allow setting default privileges globally postgresql_privs should allow to set default privileges globally Feb 24, 2022
@Andersson007
Copy link
Collaborator

@michaelkebe hello, thanks for reporting this! @tcraxs would you like to take a look?

@tcraxs
Copy link
Contributor

tcraxs commented Feb 24, 2022

@michaelkebe Thanks for pointing that out. It's true, the code just set schema = 'default', if there is no schema present in the ansible module call.
After a short look, it might not so easy to remove that part, as we rely on that default set in several other calls as well. I will have a look if that could be changed.

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

No branches or pull requests

3 participants