summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Kreen2011-12-29 14:19:50 +0000
committerMarko Kreen2011-12-29 14:19:50 +0000
commit34f4a4361786fa7397c0402fbfd7ffc8bdb0bffb (patch)
tree868021175f271d5c09f8170de76cd165fee10a0d
parent26c943faf137742f7caa856a6208550f5e7ccdb1 (diff)
dbstruct: sync acl list with 9.2 git
-rw-r--r--python/skytools/dbstruct.py20
1 files changed, 17 insertions, 3 deletions
diff --git a/python/skytools/dbstruct.py b/python/skytools/dbstruct.py
index a9283d00..617f6dc2 100644
--- a/python/skytools/dbstruct.py
+++ b/python/skytools/dbstruct.py
@@ -291,11 +291,25 @@ class TGrant(TElem):
"""Info about permissions."""
type = T_GRANT
SQL = "SELECT relacl FROM pg_class where oid = %(oid)s"
+
+ # Sync with: src/include/utils/acl.h
acl_map = {
- 'r': 'SELECT', 'w': 'UPDATE', 'a': 'INSERT', 'd': 'DELETE',
- 'R': 'RULE', 'x': 'REFERENCES', 't': 'TRIGGER', 'X': 'EXECUTE',
- 'U': 'USAGE', 'C': 'CREATE', 'T': 'TEMPORARY'
+ 'a': 'INSERT',
+ 'r': 'SELECT',
+ 'w': 'UPDATE',
+ 'd': 'DELETE',
+ 'D': 'TRUNCATE',
+ 'x': 'REFERENCES',
+ 't': 'TRIGGER',
+ 'X': 'EXECUTE',
+ 'U': 'USAGE',
+ 'C': 'CREATE',
+ 'T': 'TEMPORARY',
+ 'c': 'CONNECT',
+ # old
+ 'R': 'RULE',
}
+
def acl_to_grants(self, acl):
if acl == "arwdRxt": # ALL for tables
return "ALL"