Re: pg_dumpall with flag --no-role-passwords omits roles comments as well

From: Dominique Devienne <ddevienne(at)gmail(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Bartosz Chroł <bartosz(dot)chrol(at)handen(dot)pl>, "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_dumpall with flag --no-role-passwords omits roles comments as well
Date: 2024-03-21 10:52:12
Message-ID: CAFCRh-86h2-2EAN+8qBmzpS1J4Gxv0U20s6SpNZy_eDv7Tu4sg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 21, 2024 at 11:46 AM Daniel Gustafsson <daniel(at)yesql(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2024-03-21 11:41:13 Re: Dropping a temporary view?
Previous Message Daniel Gustafsson 2024-03-21 10:46:10 Re: pg_dumpall with flag --no-role-passwords omits roles comments as well