Lines 1-20
Link Here
|
1 |
|
|
|
2 |
$FreeBSD$ |
3 |
|
4 |
--- lib/ansible/modules/core/database/postgresql/postgresql_privs.py.orig |
5 |
+++ lib/ansible/modules/core/database/postgresql/postgresql_privs.py |
6 |
@@ -462,10 +462,13 @@ |
7 |
if obj_type == 'group': |
8 |
set_what = ','.join(pg_quote_identifier(i, 'role') for i in obj_ids) |
9 |
else: |
10 |
+ # function types are already quoted above |
11 |
+ if obj_type != 'function': |
12 |
+ obj_ids = [pg_quote_identifier(i, 'table') for i in obj_ids] |
13 |
# Note: obj_type has been checked against a set of string literals |
14 |
# and privs was escaped when it was parsed |
15 |
set_what = '%s ON %s %s' % (','.join(privs), obj_type, |
16 |
- ','.join(pg_quote_identifier(i, 'table') for i in obj_ids)) |
17 |
+ ','.join(obj_ids)) |
18 |
|
19 |
# for_whom: SQL-fragment specifying for whom to set the above |
20 |
if roles == 'PUBLIC': |