You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to grant privileges on something in a schema, the schema is not quoted properly, which results in an error.
When the schema argument contains no special quoting, the postgres raises an syntax error.
When quotes are included in the schema argument, the module aborts because the check if the schema exists fails. (Error: Schema ""c.d"" does not exist.)
This is tested with community.postgresql 2.3.1 and postgresql 10-15.
steps to reproduce
tasks:
- name: create dbcommunity.postgresql.postgresql_db:
name: "a.b"login_unix_socket: /tmp
- name: create schemacommunity.postgresql.postgresql_schema:
database: "a.b"name: '"c.d"'login_unix_socket: /tmp
- name: create tablecommunity.postgresql.postgresql_table:
db: "a.b"name: '"c.d"."e.f"'columns: []login_unix_socket: /tmp
- name: grant something on the databasecommunity.postgresql.postgresql_privs:
login_unix_socket: /tmpdatabase: "a.b"privs: CREATEroles: PUBLICtype: database
- name: grant privileges on a schemacommunity.postgresql.postgresql_privs:
login_unix_socket: /tmpdatabase: "a.b"privs: CREATEroles: PUBLICtype: schemaobjs: 'c.d'
- name: grant privileges on a table in a schemacommunity.postgresql.postgresql_privs:
login_unix_socket: /tmpdatabase: "a.b"privs: SELECTroles: PUBLICtype: tableobjs: ALL_IN_SCHEMAschema: "{{ item }}"loop:
- 'c.d'
- '"c.d"'ignore_errors: true # it fails
The text was updated successfully, but these errors were encountered:
bug in postgresql_privs
When trying to grant privileges on something in a schema, the schema is not quoted properly, which results in an error.
When the
schema
argument contains no special quoting, the postgres raises an syntax error.When quotes are included in the
schema
argument, the module aborts because the check if the schema exists fails. (Error: Schema ""c.d"" does not exist.
)This is tested with community.postgresql 2.3.1 and postgresql 10-15.
steps to reproduce
The text was updated successfully, but these errors were encountered: