mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
Fix function identifier quoting
This commit is contained in:
committed by
Matt Clay
parent
2990358cd5
commit
1a440d6a06
@@ -474,10 +474,13 @@ class Connection(object):
|
|||||||
if obj_type == 'group':
|
if obj_type == 'group':
|
||||||
set_what = ','.join(pg_quote_identifier(i, 'role') for i in obj_ids)
|
set_what = ','.join(pg_quote_identifier(i, 'role') for i in obj_ids)
|
||||||
else:
|
else:
|
||||||
|
# function types are already quoted above
|
||||||
|
if obj_type != 'function':
|
||||||
|
obj_ids = [pg_quote_identifier(i, 'table') for i in obj_ids]
|
||||||
# Note: obj_type has been checked against a set of string literals
|
# Note: obj_type has been checked against a set of string literals
|
||||||
# and privs was escaped when it was parsed
|
# and privs was escaped when it was parsed
|
||||||
set_what = '%s ON %s %s' % (','.join(privs), obj_type,
|
set_what = '%s ON %s %s' % (','.join(privs), obj_type,
|
||||||
','.join(pg_quote_identifier(i, 'table') for i in obj_ids))
|
','.join(obj_ids))
|
||||||
|
|
||||||
# for_whom: SQL-fragment specifying for whom to set the above
|
# for_whom: SQL-fragment specifying for whom to set the above
|
||||||
if roles == 'PUBLIC':
|
if roles == 'PUBLIC':
|
||||||
|
|||||||
Reference in New Issue
Block a user