diff --git a/lib/ansible/modules/database/postgresql/postgresql_privs.py b/lib/ansible/modules/database/postgresql/postgresql_privs.py index 55821756246..febdc9edf17 100644 --- a/lib/ansible/modules/database/postgresql/postgresql_privs.py +++ b/lib/ansible/modules/database/postgresql/postgresql_privs.py @@ -460,18 +460,18 @@ class Connection(object): # set_what: SQL-fragment specifying what to set for the target roles: # Either group membership or privileges on objects of a certain type if obj_type == 'group': - set_what = ','.join(pg_quote_identifiers(i, 'role') for i in obj_ids) + set_what = ','.join(pg_quote_identifier(i, 'role') for i in obj_ids) else: # Note: obj_type has been checked against a set of string literals # and privs was escaped when it was parsed set_what = '%s ON %s %s' % (','.join(privs), obj_type, - ','.join(pg_quote_identifiers(i, 'table') for i in obj_ids)) + ','.join(pg_quote_identifier(i, 'table') for i in obj_ids)) # for_whom: SQL-fragment specifying for whom to set the above if roles == 'PUBLIC': for_whom = 'PUBLIC' else: - for_whom = ','.join(pg_quote_identifiers(r, 'role') for r in roles) + for_whom = ','.join(pg_quote_identifier(r, 'role') for r in roles) status_before = get_status(objs) if state == 'present':