Avoid incorrectly granting replication to roles created with NOSUPERUSER.

Andres Freund
This commit is contained in:
Robert Haas 2011-04-13 12:26:51 -07:00
parent 40e64017f3
commit 0a49c95c73
1 changed files with 1 additions and 1 deletions

View File

@ -245,7 +245,7 @@ CreateRole(CreateRoleStmt *stmt)
* Superusers get replication by default, but only if NOREPLICATION
* wasn't explicitly mentioned
*/
if (!(disreplication && intVal(disreplication->arg) == 0))
if (issuper && !(disreplication && intVal(disreplication->arg) == 0))
isreplication = 1;
}
if (dinherit)