Merge pull request #1023 from lorin/postgres-user-fix
Fix postgresql_user bug
This commit is contained in:
commit
386c1d83b5
1 changed files with 11 additions and 9 deletions
|
@ -115,6 +115,8 @@ def get_database_privileges(cursor, user, db):
|
|||
query = 'SELECT datacl FROM pg_database WHERE datname = %s'
|
||||
cursor.execute(query, (db,))
|
||||
datacl = cursor.fetchone()[0]
|
||||
if datacl is None:
|
||||
return []
|
||||
r = re.search('%s=(C?T?c?)/[a-z]+\,?' % user, datacl)
|
||||
if r is None:
|
||||
return []
|
||||
|
|
Loading…
Reference in a new issue