Re: pg_dumpall with flag --no-role-passwords omits roles comments as well
Dominique Devienne <ddevienne@gmail.com>
From: Dominique Devienne <ddevienne@gmail.com>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Bartosz Chroł <bartosz.chrol@handen.pl>, "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Date: 2024-03-21T10:52:12Z
Lists: pgsql-general
On Thu, Mar 21, 2024 at 11:46 AM Daniel Gustafsson <daniel@yesql.se> wrote:
> > However I noticed that comments on roles are also omitted from the dump,
> as if --no--comments flag was set - but it wasn't.
>
> Comments on roles are stored against the pg_authid catalog relation
Hi. What do you mean? ROLEs are not stored in that relation.
And AFAIK, only accessible via functions using the OID or NAME.
So the relation used, pg_authid or pg_roles, shouldn't matter, no?
Here's my own query for example:
```
select rolname, rolsuper, rolinherit, rolcreaterole,
rolcreatedb, rolcanlogin, rolreplication, rolbypassrls,
oid, shobj_description(oid, 'pg_authid')
from pg_roles
...
```
--DD
Commits
-
Fix dumping role comments when using --no-role-passwords
- d82cb467bbc2 12.19 landed
- be01c8c3450e 14.12 landed
- affc46b76d50 13.15 landed
- 7e65ad197f9d 17.0 landed
- 5863bacb87c1 16.3 landed
- 12128be623fd 15.7 landed