Merge pull request #1023 from lorin/postgres-user-fix

Fix postgresql_user bug
reviewable/pr18780/r1
Michael DeHaan 12 years ago
commit 386c1d83b5

@ -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…
Cancel
Save