Re: Fix a typo in pgstatfuncs.c

From: Bharath Rupireddy <bharath(dot)rupireddyforpostgres(at)gmail(dot)com>
To: "Drouvot, Bertrand" <bdrouvot(at)amazon(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Fix a typo in pgstatfuncs.c
Date: 2022-08-10 08:30:45
Message-ID: CALj2ACW9VdVMorqkvQ8Gx5WaQuvOqu8Lj8iRG5YEAhw=bo3muw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 10, 2022 at 1:22 PM Drouvot, Bertrand <bdrouvot(at)amazon(dot)com> wrote:
>
> Hi,
>
> It seems like there's the following typo in pgstatfuncs.c:
>
> - /* Values only available to role member or
> pg_read_all_stats */
> + /* Values only available to role member of
> pg_read_all_stats */
>
> Attaching a tiny patch to fix it.

I don't think it's a typo, the comment says that the values are only
available to the user who has privileges of backend's role or
pg_read_all_stats, the macro HAS_PGSTAT_PERMISSIONS says it all.

IMO, any of the following works better, if the existing comment is confusing:

/* Values only available to the member{or role or user} with
privileges of backend's role or pg_read_all_stats */

/* Values only available to the member{or role or user} that
has membership in backend's role or has privileges of
pg_read_all_stats */

--
Bharath Rupireddy
RDS Open Source Databases: https://aws.amazon.com/rds/postgresql/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-08-10 08:37:18 Re: [BUG] Panic due to incorrect missingContrecPtr after promotion
Previous Message Etsuro Fujita 2022-08-10 08:30:20 Re: Fast COPY FROM based on batch insert