]> granicus.if.org Git - postgresql/commitdiff
Avoid incorrectly granting replication to roles created with NOSUPERUSER.
authorRobert Haas <rhaas@postgresql.org>
Wed, 13 Apr 2011 19:26:51 +0000 (12:26 -0700)
committerRobert Haas <rhaas@postgresql.org>
Wed, 13 Apr 2011 19:28:53 +0000 (12:28 -0700)
Andres Freund

src/backend/commands/user.c

index 9c9164d3bc722d71484e2d012a7bf65e95fed77b..3f7d4992af8df3c706bca0e05497a673a31c0440 100644 (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)