Skip to content

Commit 1f8a424

Browse files
ritanwarshardgupta
authored andcommitted
[BABEL-5675] Fix babelfish dumpall after community 16eff4261f
Community commit 16eff4261f changed query to fetch role membership which is duplicated in dumpall_babel_utils.c file so this commit updates the duplicated query accordingly. cr: https://code.amazon.com/reviews/CR-183415429
1 parent 32989dc commit 1f8a424

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/bin/pg_dump/dumpall_babel_utils.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,10 +309,12 @@ getBabelfishRoleMembershipQuery(PGconn *conn, PQExpBuffer buf,
309309
"bbf_roles AS (SELECT rc.* FROM %s rc INNER JOIN bbf_catalog bcat "
310310
"ON rc.rolname = bcat.rolname) ", role_catalog);
311311

312-
appendPQExpBufferStr(buf, "SELECT ur.rolname AS roleid, "
312+
appendPQExpBufferStr(buf, "SELECT ur.rolname AS role, "
313313
"um.rolname AS member, "
314314
"a.admin_option, "
315-
"ug.rolname AS grantor "
315+
"ug.rolname AS grantor, "
316+
"a.roleid AS roleid, "
317+
"a.member AS memberid "
316318
"FROM pg_auth_members a "
317319
"INNER JOIN bbf_roles ur on ur.oid = a.roleid "
318320
"INNER JOIN bbf_roles um on um.oid = a.member "

0 commit comments

Comments
 (0)