Commit 0a49c95c authored by Robert Haas's avatar Robert Haas

Avoid incorrectly granting replication to roles created with NOSUPERUSER.

Andres Freund
parent 40e64017
...@@ -245,7 +245,7 @@ CreateRole(CreateRoleStmt *stmt) ...@@ -245,7 +245,7 @@ CreateRole(CreateRoleStmt *stmt)
* Superusers get replication by default, but only if NOREPLICATION * Superusers get replication by default, but only if NOREPLICATION
* wasn't explicitly mentioned * wasn't explicitly mentioned
*/ */
if (!(disreplication && intVal(disreplication->arg) == 0)) if (issuper && !(disreplication && intVal(disreplication->arg) == 0))
isreplication = 1; isreplication = 1;
} }
if (dinherit) if (dinherit)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment