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 12:16:35
Message-ID: CAFCRh-8X7MNyMPAWAxRbQemFK=Cs8AMJOcc6Lz0ijmmqKhgL2g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Thu, Mar 21, 2024 at 11:52 AM Dominique Devienne <ddevienne(at)gmail(dot)com>
wrote:

> 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? COMMENTs 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?
>

OK, I see now you meant shobj_description(oid, 'pg_authid'),
i.e. that 'pg_authid' literal in the function call. Thus your use of
"against" in the above sentence. Apologies for my misunderstanding.

But that literal in the function call is separate from which relation,
pg_authid or pg_roles, one actually SELECT from, as already shown. --DD

```
> select ..., shobj_description(oid, 'pg_authid')
> from pg_roles
> ...
> ```
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message veem v 2024-03-21 12:16:49 Re: Not able to purge partition
Previous Message Alvaro Herrera 2024-03-21 11:47:49 Re: Question about PostgreSQL upgrade from version 12 to version 15