pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feed[PATCH v1] fix dump of role comments with --no-role-passwords
1+ messages / 1 participants
[nested] [flat]
* [PATCH v1] fix dump of role comments with --no-role-passwords
@ 2024-03-21 12:27 Alvaro Herrera <alvherre@alvh.no-ip.org>
0 siblings, 0 replies; 1+ messages in thread
From: Alvaro Herrera @ 2024-03-21 12:27 UTC (permalink / raw)
---
src/bin/pg_dump/pg_dumpall.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
inline patch 1: src/bin/pg_dump/pg_dumpall.c (+6/-6 lines) download inline-1.patch
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c
index 491311fe79..72c30fc66d 100644
--- a/src/bin/pg_dump/pg_dumpall.c
+++ b/src/bin/pg_dump/pg_dumpall.c
@@ -776,21 +776,21 @@ dumpRoles(PGconn *conn)
"rolcreaterole, rolcreatedb, "
"rolcanlogin, rolconnlimit, rolpassword, "
"rolvaliduntil, rolreplication, rolbypassrls, "
- "pg_catalog.shobj_description(oid, '%s') as rolcomment, "
+ "pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment, "
"rolname = current_user AS is_current_user "
"FROM %s "
"WHERE rolname !~ '^pg_' "
- "ORDER BY 2", role_catalog, role_catalog);
+ "ORDER BY 2", role_catalog);
else if (server_version >= 90500)
printfPQExpBuffer(buf,
"SELECT oid, rolname, rolsuper, rolinherit, "
"rolcreaterole, rolcreatedb, "
"rolcanlogin, rolconnlimit, rolpassword, "
"rolvaliduntil, rolreplication, rolbypassrls, "
- "pg_catalog.shobj_description(oid, '%s') as rolcomment, "
+ "pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment, "
"rolname = current_user AS is_current_user "
"FROM %s "
- "ORDER BY 2", role_catalog, role_catalog);
+ "ORDER BY 2", role_catalog);
else
printfPQExpBuffer(buf,
"SELECT oid, rolname, rolsuper, rolinherit, "
@@ -798,10 +798,10 @@ dumpRoles(PGconn *conn)
"rolcanlogin, rolconnlimit, rolpassword, "
"rolvaliduntil, rolreplication, "
"false as rolbypassrls, "
- "pg_catalog.shobj_description(oid, '%s') as rolcomment, "
+ "pg_catalog.shobj_description(oid, 'pg_authid') as rolcomment, "
"rolname = current_user AS is_current_user "
"FROM %s "
- "ORDER BY 2", role_catalog, role_catalog);
+ "ORDER BY 2", role_catalog);
res = executeQuery(conn, buf->data);
--
2.39.2
--5srwxcr3o5ojzrxr--
^ permalink raw reply [nested|flat] 1+ messages in thread
only message in thread
Thread overview: 1+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2024-03-21 12:27 [PATCH v1] fix dump of role comments with --no-role-passwords Alvaro Herrera <alvherre@alvh.no-ip.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox