Re: Grants and privileges issue

From: Erik Wienhold <ewie(at)ewie(dot)name>
To: sud <suds1434(at)gmail(dot)com>
Cc: Adrian Klaver <adrian(dot)klaver(at)aklaver(dot)com>, pgsql-general <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: Re: Grants and privileges issue
Date: 2024-03-28 22:22:07
Message-ID: 3gtbyn5ax5u5ecyzw6iq6ep3jtuzuvhqyocdripu25pzt654vl@j25b5whguf63
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On 2024-03-28 22:43 +0100, sud wrote:
> Regarding my second question, I am still unable to find out why we are
> seeing "*no privileges were granted for cron/partman/part_config*' message
> while adding the grants to the user?

Because the role that is granting the privileges is missing the grant
option. For example below, alice is missing the grant option and she
gets that warning when she wants to grant her privileges to bob.

=# CREATE ROLE alice; CREATE ROLE bob; CREATE TABLE t (a int);
CREATE ROLE
CREATE ROLE
CREATE TABLE
=# GRANT ALL ON t TO alice;
GRANT
=# SET ROLE alice;
SET
=> GRANT ALL ON t TO bob;
WARNING: no privileges were granted for "t"
GRANT

With GRANT ALL ON t TO alice WITH GRANT OPTION it would've worked.

--
Erik

In response to

Browse pgsql-general by date

  From Date Subject
Next Message 黄宁 2024-03-29 01:28:36 how to check if the license is expired.
Previous Message Laurenz Albe 2024-03-28 22:01:52 Re: pg_rewind after promote