diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 05:05:26 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-21 05:05:26 +0000 |
commit | e75d99818dd3940be997520e64db8c9e3b207e39 (patch) | |
tree | 0003ca0de74fcc8d18433e34ea68d2e7aaf06b7c /src/bin/pg_dump/pg_dumpall.c | |
parent | Releasing progress-linux version 15.6-0+deb12u1~progress6.99u1. (diff) | |
download | postgresql-15-e75d99818dd3940be997520e64db8c9e3b207e39.tar.xz postgresql-15-e75d99818dd3940be997520e64db8c9e3b207e39.zip |
Merging upstream version 15.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/bin/pg_dump/pg_dumpall.c')
-rw-r--r-- | src/bin/pg_dump/pg_dumpall.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/bin/pg_dump/pg_dumpall.c b/src/bin/pg_dump/pg_dumpall.c index 7e639f9..950bc41 100644 --- a/src/bin/pg_dump/pg_dumpall.c +++ b/src/bin/pg_dump/pg_dumpall.c @@ -736,28 +736,31 @@ dumpRoles(PGconn *conn) i_is_current_user; int i; - /* note: rolconfig is dumped later */ + /* + * Notes: rolconfig is dumped later, and pg_authid must be used for + * extracting rolcomment regardless of role_catalog. + */ if (server_version >= 90600) 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 " "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, " @@ -765,10 +768,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); |