Fixed an issue where the REVOKE statement in the create script was throwing an error if the role contained special characters. #7737

This commit is contained in:
Pravesh Sharma 2024-08-01 11:34:00 +05:30 committed by GitHub
parent c6e7ce03cc
commit 2e878a3fb2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -701,10 +701,13 @@ class BaseTableView(PGChildNodeView, BasePartitionTable, VacuumSettings):
data['relacl'] = parse_priv_to_db(data['relacl'], self.acl)
if 'acl' in data:
driver = get_driver(PG_DEFAULT_DRIVER)
data.update({'revoke_all': []})
for acl in data['acl']:
if len(acl['privileges']) > 0 and len(acl['privileges']) < 7:
data['revoke_all'].append(acl['grantee'])
data['revoke_all'].append(
driver.qtIdent(None, acl['grantee'])
if acl['grantee'] != 'PUBLIC' else 'PUBLIC')
# if table is partitions then
if 'relispartition' in data and data['relispartition']: