Merge "Malformed user access sql for postgres guest agent"
This commit is contained in:
commit
ffcc149891
@ -212,7 +212,7 @@ class UserQuery(object):
|
||||
def update_name(cls, old, new):
|
||||
"""Query to update the name of a user."""
|
||||
|
||||
return "ALTER USER \"{old}\" RENAME TO '{new}'".format(
|
||||
return "ALTER USER \"{old}\" RENAME TO \"{new}\"".format(
|
||||
old=old,
|
||||
new=new,
|
||||
)
|
||||
@ -231,7 +231,7 @@ class AccessQuery(object):
|
||||
"""Query to list grants for a user."""
|
||||
|
||||
return (
|
||||
"SELECT datname "
|
||||
"SELECT datname, pg_encoding_to_char(encoding), datcollate "
|
||||
"FROM pg_database "
|
||||
"WHERE datistemplate = false "
|
||||
"AND 'user {user}=CTc' = ANY (datacl)".format(user=user)
|
||||
|
Loading…
Reference in New Issue
Block a user