diff options
Diffstat (limited to 'src/backend/commands/user.c')
-rw-r--r-- | src/backend/commands/user.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/backend/commands/user.c b/src/backend/commands/user.c index 9e505b7525f..be049cb9945 100644 --- a/src/backend/commands/user.c +++ b/src/backend/commands/user.c @@ -248,7 +248,15 @@ CreateRole(CreateRoleStmt *stmt) if (dpassword && dpassword->arg) password = strVal(dpassword->arg); if (dissuper) + { issuper = intVal(dissuper->arg) != 0; + /* + * Superusers get replication by default, but only if + * NOREPLICATION wasn't explicitly mentioned + */ + if (!(disreplication && intVal(disreplication->arg) == 0)) + isreplication = 1; + } if (dinherit) inherit = intVal(dinherit->arg) != 0; if (dcreaterole) |