Skip to content
Snippets Groups Projects
Commit 0a49c95c authored by Robert Haas's avatar Robert Haas
Browse files

Avoid incorrectly granting replication to roles created with NOSUPERUSER.

Andres Freund
parent 40e64017
No related branches found
No related tags found
No related merge requests found
...@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment