From 59ebf4700cc7e8d90a21b7220ebc717b1e813f88 Mon Sep 17 00:00:00 2001 From: Sharu Goel Date: Mon, 6 Jan 2025 13:29:06 +0000 Subject: [PATCH] Some fixes for db_owner role This commit changes the suffix for internally associated role from "_obj" to "_bbfobj" for users that are member of db_owner role. This is done to reduce the chance of an internal name clash. Task: BABEL-4899, BABEL-5491, BABEL-5502 Signed-off-by: Sharu Goel --- src/bin/pg_dump/dumpall_babel_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bin/pg_dump/dumpall_babel_utils.c b/src/bin/pg_dump/dumpall_babel_utils.c index 2427e97b9b7..9dba511364d 100644 --- a/src/bin/pg_dump/dumpall_babel_utils.c +++ b/src/bin/pg_dump/dumpall_babel_utils.c @@ -271,7 +271,7 @@ getBabelfishRolesQuery(PGconn *conn, PQExpBuffer buf, char *role_catalog, appendPQExpBuffer(buf, ") AS db_owner_members " - "JOIN pg_roles pr ON pr.rolname = sys.babelfish_truncate_identifier(db_owner_members.member_role || '_obj') "); + "JOIN pg_roles pr ON pr.rolname = sys.babelfish_truncate_identifier(db_owner_members.member_role || '_bbfobj') "); appendPQExpBuffer(buf, "), " "bbf_roles AS (SELECT rc.* FROM %s rc INNER JOIN bbf_catalog bcat " @@ -389,7 +389,7 @@ getBabelfishRoleMembershipQuery(PGconn *conn, PQExpBuffer buf, appendPQExpBuffer(buf, ") AS db_owner_members " - "JOIN pg_roles pr ON pr.rolname = sys.babelfish_truncate_identifier(db_owner_members.member_role || '_obj') "); + "JOIN pg_roles pr ON pr.rolname = sys.babelfish_truncate_identifier(db_owner_members.member_role || '_bbfobj') "); appendPQExpBuffer(buf, "), " "bbf_roles AS (SELECT rc.* FROM %s rc INNER JOIN bbf_catalog bcat "