Fix stop condition for dumping GRANT commands

Commit ce6b672e44 changed dumping GRANT commands to ensure that
grantors already have an ADMIN OPTION on the role for which it
is granting permissions. Looping over the grants per role has a
stop condition on dumping the grant statements, but accidentally
missed updating the variable for the conditional check.

Author: Andreas Scherbaum <ads@pgug.de>
Co-authored-by: Artur Zakirov <zaartur@gmail.com>
Discussion: https://postgr.es/m/de44299d-cd31-b41f-2c2a-161fa5e586a5@pgug.de
This commit is contained in:
Daniel Gustafsson 2023-04-26 14:24:13 +02:00
parent 4def50eba9
commit 7b7fa85130
1 changed files with 1 additions and 0 deletions

View File

@ -1052,6 +1052,7 @@ dumpRoleMembership(PGconn *conn)
PQfinish(conn);
exit_nicely(1);
}
prev_remaining = remaining;
/* Make one pass over the grants for this role. */
for (i = start; i < end; ++i)